我有這個屬性的默認值。任何人都可以幫助我如何有一個下拉菜單選擇值?我要上降下來的值纔會出現只有1-10
...使用下拉菜單在C#中添加控件屬性
private int _margin = 10;
[Bindable(true), Category(_category), DefaultValue(10)]
public int MarginWidth
{
get { return _margin; }
set { _margin = Math.Abs(value); Invalidate(); }
}
反正,你怎麼把這種[Bindable(true), Category(_category), DefaultValue(10)]
只是爲谷歌搜索參考關鍵?
對不起,我用它作爲例子..實際上我想添加一個控件屬性像ButtonSet:然後在下拉菜單中,有選項「設置A」,「設置B」,「設置C」..等.. – 2011-05-12 03:55:44