Ali Tor Ali Tor - 1 year ago 73
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?

Answer Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download