I have this properties with default value. Can anyone help me on how to have a drop down menu for choices on values?. I want the values on the drop down only appears 1-10 only…
private int _margin = 10;
[Bindable(true), Category(_category), DefaultValue(10)]
public int MarginWidth
{
get { return _margin; }
set { _margin = Math.Abs(value); Invalidate(); }
}

Anyway, how do you call this [Bindable(true), Category(_category), DefaultValue(10)]
just a key for google searching for reference?
Each of the items in the square brackets are
Attributes, eg.BindableAttribute,CategoryAttributeandDefaultValueAttribute.In a nutshell, attributes are used to attach metadata to methods. What information is totally definable by the creator of the attribute. These attributes can be obtained again via reflection and their data accessed. The documentation for the
Attributeclass linked above has a lot of information about usage, etc.