【问题标题】:MonoTouch.Dialog: how to create RadioElement inside another RootElement?MonoTouch.Dialog:如何在另一个 RootElement 中创建 RadioElement?
【发布时间】:2012-07-19 11:08:15
【问题描述】:

我有两个 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...

【问题讨论】:

    标签: c# xamarin.ios monotouch.dialog


    【解决方案1】:

    指定无线电组,如下所示:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-04
      • 1970-01-01
      • 1970-01-01
      • 2012-01-22
      • 1970-01-01
      • 2011-08-27
      相关资源
      最近更新 更多