Is it possible to create a Checkbox Selection list using MonoTouch.Dialog?
Basically I want the same functionality that you get by using the RadioSelection attribute except that it allows multiple selections to be made.
Something like this:
[CheckSelection]
private IList<int> currentSelections;
private IList<string> myList;
Loo开发者_运维技巧king at the documentation there doesn't seem to be a mention of anything like this. So my question is: Can a Checkbox Selection list be created with the present version of MonoTouch.Dialog? If so, then how? If not, is there a better way to handle this case?
You'll have to extend MT.Dialog to do this.
This is the approach I used to achieve this:
var root new RootElement() {
new Section("Bacon"){
new RootElement ("Types", new RadioGroup (0)){
new Section(){
new CheckboxElement ("Smokey"),
new CheckboxElement ("Streaky"),
new CheckboxElement ("Rasher")
}
}
}
};
Taken from
http://monotouch.2284126.n4.nabble.com/MT-Dialog-multi-select-element-td4516738.html
精彩评论