2012-07-19 43 views
1

我有兩個裝箱的RootElement元素。看代碼。最深的水平應該是可打的StringElement,允許選擇當前的評論。但是,由於缺少RadioGroup,我得到一個NULL引用錯誤。 MT.Dialog可以嗎?MonoTouch.Dialog:如何在另一個RootElement內創建RadioElement?

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... 

回答

3

指定無線電設備組,如下所示:

new RootElement ("Local Profile", new RadioGroup (0)) { 
    .... 
} 
相關問題