Question

I am trying to make table view cell as follows using Xamarin Studio.

enter image description here

public enum Category
{
Travel,
Lodging,
Books
}

I am using Monotouch.Dialog, but cannot find any element. Any advice?

Was it helpful?

Solution

I guess what you're looking for is the RadioElement of MonoTouch.Dialog. You can see an example in section 3.1 in the MonoTouch.Dialog introduction.

From the example in the doc:

var root = new RootElement ("Meals") {
    new Section ("Dinner"){
        new RootElement ("Dessert", new RadioGroup ("dessert", 2)) {
            new Section () {
                new RadioElement ("Ice Cream", "dessert"),
                new RadioElement ("Milkshake", "dessert"),
                new RadioElement ("Chocolate Cake", "dessert")
            }
        }
     }
}

With this example, you'll have a dialog with one root element called Meals. When tapping this item, you will be presented a new dialog where you can select one of the RadioElements. You create a RadioGroup for the elements that belong together, and the RootElement from which you launch the RadioGroup will show the currently selected value. There's more information about this in section 4.8. of the provided link as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top