我有一个UserControl
,其中包含一个属性
public Button TargetButton { get; set; }
UserControl
还包含例如3个按钮。
现在我有一个主UI或控件,它继承自此UserControl
UI控件具有Button
。现在我被认为PropertyGrid或VS Desginer中的TargetButton将仅在UiControl中显示按钮。但实际上它显示所有按钮。 UserControl
的核心按钮和UI控件中的普通按钮。
如何从PropertyGrid或VS Designer TargetButton属性选择列表中排除UserControl的按钮?
例如:UserControl中的属性,例如
[TypeConverter(ExcludeObjects(coreBtn1, coreBtn2 ))]
所以我所需要防止的是“我的媒体资源”选择基本UserControl上的“核心按钮”。但只有我可以在Main Control或UIControl中选择一个从UserControl继承的按钮