Ali Tor Ali Tor - 4 months ago 18
C# Question

How to set an explainer text or Description for my custom Control for Windows Forms ToolBox?

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:

I have tried

but it didn't work for me. How can it be done?


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