0

I have an application using the MonoTouch.Dialog Reflection API, and I have a view model with a couple of int properties. Unfortunately, it doesn't seem like MonoTouch.Dialog have any elements supporting integer types. I would expect it to be a simple element that displays a UIPicker with a range of numbers. I'm aware that there is a CounterElement in the monotouch-element-pack, but it doesn't seem like it's possible to use it with the Reflection API. So the question is:

  • Does an element fitting these requirements already exist?

Or if not

  • Is it possible to extend the Reflection API with custom attributes for custom elements?
  • Can one combine the Reflection API and the Element API?
NilsH
  • 13,705
  • 4
  • 41
  • 59

1 Answers1

1

why not use a RadioElement with the list of valid integers?

var root = new RootElement ("Test") {
    new Section ("Count"){
            new RootElement ("Attendance", new RadioGroup ("Group", 2) {
                new Section () {
                    new RadioElement ("1", "1"),
                    new RadioElement ("2", "2"),
                    new RadioElement ("3", "3")
                }
            }
        }
    }
Jason
  • 86,222
  • 15
  • 131
  • 146
  • The range of integers would be too large to use a radio group, but thanks for the suggestion. – NilsH May 13 '13 at 14:43
  • 1
    Then you're probably better off creating (or using someone else's) a custom element. To do this with the reflection API, I believe that you have modify the source (I think just Reflect.cs) – Jason May 13 '13 at 19:05