title: How to add control in stacklayout of contentview in contentpage?
body: <p>I am using xamarin.forms. having two projects Android and IOS.</p>
  
  <p>I have one ContentView page with following code</p>
  
  <pre><code>&lt;ContentView.Content&gt;
      &lt;StackLayout x:Name="slMain" Padding="1" BackgroundColor="#7ABA45"&gt;
          &lt;StackLayout VerticalOptions="FillAndExpand" Padding="0,0,20,0" HeightRequest="50" HorizontalOptions="FillAndExpand"&gt;
              &lt;Label x:Name="lblTitle" VerticalOptions="CenterAndExpand"  /&gt;
          &lt;/StackLayout&gt;
          &lt;StackLayout x:Name="sl" IsVisible="False" BackgroundColor="White"&gt;
          &lt;/StackLayout&gt;
      &lt;/StackLayout&gt;
  &lt;/ContentView.Content&gt;
  
  
  // In Behind code(.cs file)
  
      public ExpandCollapseStackLayout()
      {
          InitializeComponent(); 
          var tapGestureRecognizer = new TapGestureRecognizer();
          tapGestureRecognizer.Tapped += (s, e) =&gt;
          {
              sl.IsVisible = !sl.IsVisible;
          };
          lblTitle.GestureRecognizers.Add(tapGestureRecognizer);
          slMain.GestureRecognizers.Add(tapGestureRecognizer);
      }
  
      public string Title
      {
          get
          {
              return lblTitle.Text;
          }
          set
          {
              lblTitle.Text = value;
          }
      }
  </code></pre>
  
  <p>I want to add controls in StackLayout named "sl" of contentview in ContentPage at design time.
  I dont want to add at runtime</p>
  
  <p>Please suggest me how can I add Control in Contentview stacklayout?</p>