title: mono for android - dynamically add a layout to a scrollview
body: <p>I want to add a layout dynamically into a ScrollView. I tried everything I found in google and here, but no chance! Most of them causes "Object Reference" error. Here's one of the codes:</p>
  
  <pre><code>LayoutInflater layoutInflater = (LayoutInflater) this.GetSystemService(Context.LayoutInflaterService);    
  View view = new View(this);
  view = layoutInflater.Inflate(Resource.Layout.MYLAYOUT, null);
  MYSCROLLVIEW.AddView(view);
  </code></pre>
  
  <p>But it causes the "Object reference not set to instance of an object".</p>
  
  <p>And after that, I want to use the controls (views) inside MYLAYOUT, for example:</p>
  
  <p>MYLAYOUT.textView1.Text = "example";</p>