title: Adding buttons dynamically in stacklayout
body: <p>I would like to add a button dynamically in <code>StackLayout</code> when "add" button is clicked. I wrote <code>stacklayoutname.children.add(button)</code>, it does not giving me the thing i am looking for.</p>
  
  <p>In xaml: </p>
  
  <pre><code>&lt;StackLayout x:Name="layout"&gt;
      &lt;Button Text="add" Clicked="Addbutton"/&gt;
  &lt;/StackLayout&gt;
  </code></pre>
  
  <p>In code:  </p>
  
  <pre><code>private void Addbutton(object sender, EventArgs e)
  {           
       var layout = new StackLayout();
       var btn = new Button { Text = "New button", FontSize = 30, TranslationY = 30 };
       this.Content = layout;
       layout.Children.Add(btn);
  }
  </code></pre>
  
  <p>It is giving only new button and add button is disappearing, but I want whenever we click on add button it should give number of new button equal to the number of clicks on add button.</p>