MonoTouch.Dialog:如何在另一个RootElement中创建RadioElement?

时间:2012-07-19 11:08:16

标签: c# xamarin.ios monotouch.dialog

我装了两个RootElement个元素。见代码。最深层次应该具有可点击的StringElement,允许选择当前的评论。但是,由于缺少RadioGroup,我收到NULL引用错误。 MT.Dialog有可能吗?

Root = new RootElement ("Annotations")
{
  new Section ("Review")
  {
    // This element's caption is supposed to be whatever gets selected deep down.
    new RootElement("Reviews", new RadioGroup(0))
    {
      new Section("My Reviews")
      {
        new RootElement("Local profile")
       {
         new Section()
         {
           // Tapping this element should make "Local profile selected" appear as caption of the "Reviews" RootElement.
           new RadioElement("Activate", "Local profile selected")
         },
...more elements...

1 个答案:

答案 0 :(得分:3)

指定广播组,如下所示:

new RootElement ("Local Profile", new RadioGroup (0)) {
    ....
}