Examining Control Attributes

When you are creating custom controls, you want to be sure that your controls behave well and don't interfere with the proper behavior of the Visual Studio .NET IDE. Remember, it is your code running in the Form Designer when users are using your custom controls.

If you have public properties that raise an exception, for instance, when invalid data is assigned, you may want to prevent consumers from modifying a property of a control at design time. A couple of attributes control the accessibility of a property in the Properties window. The EditorBrowsableAttribute determines whether a property or method is visible in a designer. For example, Intellisense uses the EditorBrowsableAttribute to determine which members ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.