【发布时间】:2012-01-12 17:16:22
【问题描述】:
我有一个这样的组件:
public partial class FontScalingManager : Component
{
...other stuff...
/// <summary>
/// List of Controls, which get their Font scaled
/// </summary>
[ListBindable(BindableSupport.Yes),
Description("List of Controls, which get their Font scaled")]
public List<Control> ScalingControls
{
get { return _scalingControls; }
}
}
所以,在将这个组件放到表单上之后,我想在设计器中填写这个列表。我宁愿在设计器中使用 UITypeEditor 或其他东西手动执行此操作,方法是选择表单中的一些控件。
按原样,设计器自动给我一个编辑器来将新控件添加到此列表中,那么我如何设法告诉它,我想从所有现有控件中进行选择?
我可以为那个编辑器设置一些东西,还是需要一个自定义的?
感谢每一个帮助。
【问题讨论】:
-
Thomas6767:不客气。另外,由于您是 StackOverflow 的新手,我想通知您,您可以通过选中答案旁边的勾号来接受对您帮助最大的答案。
标签: c# custom-component