How to set description for my Custom Control to show in ToolBox?

前端 未结 1 730
旧时难觅i
旧时难觅i 2021-01-14 11:16

I want to add a text that tells the designer what my control is into my custom control when it is in design time. Like VS default controls in here:

相关标签:
1条回答
  • 2021-01-14 11:33

    You can decorate your class with Description attribute. Then when you add the control to toolbox using Choose Items ... or using a vsix package, the description will be shown as a tooltip for your control:

    [Description("Some Description")]
    public partial class UserControl1 : UserControl
    {
    }
    
    0 讨论(0)
提交回复
热议问题