title: Carousel - add different pages to Carousel
body: <p>I am receiving an error - "Carousel has no children".</p>
  
  <p>I utilized the carousel sample from Xamarin.  Carousel works if the pages are the same.  My requirement is that my pages are different but I want it to work in a carousel.  </p>
  
  <ol>
  <li>Page 1 - Image</li>
  <li>Page 2 - Buttons</li>
  <li>Page 3 - Check Boxes</li>
  </ol>
  
  <p><strong>MainPage.xaml</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8" ?&gt;
      &lt;CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"
                    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                    x:Class="CarouselApp.MainPage"&gt;
          &lt;CarouselPage.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;ContentPage&gt;
                      &lt;ContentPage.Padding&gt;
                          &lt;OnPlatform x:TypeArguments="Thickness" iOS="0,40,0,0" Android="0,40,0,0"&gt; 
                      &lt;/ContentPage.Padding&gt;
                      &lt;StackLayout&gt;
                              &lt;ContentView BindingContext="PageName"&gt;&lt;/ContentView&gt;
                      &lt;/StackLayout&gt;
                  &lt;/ContentPage&gt;
              &lt;/DataTemplate&gt;
          &lt;/CarouselPage.ItemTemplate&gt;
      &lt;/CarouselPage&gt;
  </code></pre>
  
  <p><strong>MainPage.cs</strong></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  using Xamarin.Forms;
  
  namespace CarouselApp
  {
      public partial class MainPage : CarouselPage
      {
          public MainPage()
          {
              InitializeComponent();
              ItemsSource = CarouselAppDataModel.All;
          }
      }
  }
  </code></pre>
  
  <p><strong>DataModel</strong></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Collections.ObjectModel;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using Xamarin.Forms;
  
  namespace CarouselApp
  {
      public class CarouselDataModel : ContentView
      {
          public ContentView PageName { get; set; }
          public static IList&lt;CarouselDatModel&gt; All { get; set; }
  
          private Carousel03 fl3 as new Carousel03;
          private Carousel04 fl4 as new Carousel04;
  
          public CarouselDataDataModel()
          {
              All = new ObservableCollection&lt;CarouselDataModel&gt;
              {
                  new CarouselDataModel
                  {
                      PageName = fl3
                  },
                  new CarouselDataModel
                  {
                      PageName = fl4
                  }
              };
          }
      }
  }
  </code></pre>