title: Setting bounds for a UIViewElement - Monotouch.Dialog
body: <p>I'm trying to Display a UITextView in an UIViewElement. I would like the Element to size itself to the text. </p>
  
  <p>I am expecting to be able to do something like this...</p>
  
  <pre><code> UITextView textView = new UITextView();
  
  
  
      textView.Font = UIFont.SystemFontOfSize(15);
         var stringSize = textView.StringSize(someArbitraryText, 
                                              textView.Font, 
                                              new SizeF(320, 2000), 
                                              UILineBreakMode.WordWrap);
  
         textView.Bounds = new RectangleF(0,0,stringSize.Width, stringSize.Height);          
         textView.Center = new PointF(stringSize.Width/2, stringSize.Height/2);
         textView.Editable = false;
         textView.DataDetectorTypes = UIDataDetectorType.All;
         textView.Text = someArbitraryText;
         textView.ScrollEnabled = false;       
  
  
  
  
  
     root.Add(
        new Section("My Section:")
        {
  
           new UIViewElement("My Caption:", textView, false),
  
        });
  </code></pre>
  
  <p>This gets me close, but leaves parts of my UITextView over the Element boundary. I would like the UIViewElement to be sized large enough to fit my custom view. Is there a way to this without going in and modifying the UIViewElement source?</p>