title: Monotouch.Dialog RootElement that opens a UIViewController and Passing in Data
body: <p>Is there a proper way to use Monotouch.Dialog (iOs) and call a UIViewController when a user clicks on a RootElement?  I'm building a page of data based on an array and when clicked I'd like to open this custom view and pass in the array element.. Something like this (doesn't work).  Any help is appreciated.</p>
  
  <pre><code>RootElement CreateMenuCategory(JToken menucat) {
  
    RootElement MenuCategory = new RootElement(menucat["menucategoryname"].Value&lt;String&gt;());
  
    RootElement root_element; 
    Section section = new Section(); 
    foreach(JToken menuitem in menucat["menuitems"]) { 
      root_element = new RootElement(menuitem["menuitemname"].Value&lt;String&gt;(), (RootElement e) =&gt; {
          return _menuitemView.LoadMenuItem(menuitem);  // menuitem on view is always the same
    }); 
  
    section.Add (root_element);
  
    }
  
  MenuCategory.Add (section); 
  
  return MenuCategory; 
  }
  </code></pre>
  
  <p>That code doesn't work as the delegate always passes in the same element every time.</p>