开发者

MonoTouch.Dialog: No Default value

开发者 https://www.devze.com 2023-04-03 17:26 出处:网络
I am using the BindingContext to generate the table and don\'t want a default value chosen. My Class has this field:

I am using the BindingContext to generate the table and don't want a default value chosen.

My Class has this field:

[RadioSelection ("Model:")] 
public int model = -1;
public IList<string> Model; 

It is then added to the Root:

car = new AddCar () {
    Model = new List<string>(){"ES 250","ES 300","ES 330","ES 350"开发者_如何学运维}
};
bc = new BindingContext (this, car, "Add Your Vehicle");
this.Root = bc.Root;

However the UI renders a selected value "ES 250" instead of a blank value:

MonoTouch.Dialog: No Default value


Add a null or empty value to the beginning of your list. Otherwise your only option is to modify MT.Dialog to behave the way you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号