Properties for a custom control using the .NET Compact framework
I was able to display my custom control properties in the properties window (using the EditorBrowsable () attribute). But I have another property that has a class that returns a type. The same property appears in the window as read-only format. I need a property, it should take class values at design time in exactly the same way,
Font
Name="Verdana"
Size="12"
0
a source to share
1 answer
Instead of using EditorBrowsable (), use:
System.ComponentModel.Browsable()
System.ComponentModel.DefaultValue()
System.ComponentModel.Category()
DefaultValue will tell the design that the property has a default value and won't try to set it unless it's changed. A category places your property in a specific category. These two properties are unnecessary, but nice to use.
+1
a source to share