Krumelur Krumelur - 1 year ago 109
C# Question

Monotouch.Dialog: how to preselect an element from a RadioGroup?

I have an element in my Monotouch.Dialog Controller that discloses a list of possible selections (RadioGroup with many RadioElements).
If one of the elements is picked, I pop one controller of my stack and the element that showed the subitems now shows the selected item’s value.

However, if the dialog gets initialized I want to set the element's current value.
I tried setting the section's "Selected" property but that does not seem to do the trick.

I noticed that the RadioGroup constructor has an index that allows selecting but how can I change the selection afterwards?

Answer Source

Finally found it. Well hidden in the RootElement. The property is "RadioSelected".

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download