Search code examples
.netvb.netpropertiespropertygrid

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.


Solution

  • 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.