Mech_Engineer Mech_Engineer - 16 days ago 6
Vb.net Question

class property displayed name in propertygrid

How do I set the displayed name of property in the property grid?

Public Property WeldOrientation As Double


WeldOrientation is not proper formatted, a space between the two words is required. How do you set the displayed name for a property?

Thank you.

Answer

You can use the DisplayName attribute:

<DisplayName("Weld Orientation")>
Public Property WeldOrientation As Double

You may have to add a reference to System.ComponentModel to use it.

Comments