title: How can I bind an observable collection to a flexlayout in xamarin?
body: <p>I need to bind an ObservableCollection view to a FlexLayout (because I need
  a custom appearance). When I bind the items to the CollectionView they don't
  have same look that I get when I use grid directly inside FlexLayout, for
  example:</p>
  
  <p>This works as expected but with no binding, of course.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;FlexLayout Grid.Row="5"
              Grid.Column="0"
              Margin="10,15,10,5"
              HorizontalOptions="FillAndExpand"
              VerticalOptions="StartAndExpand"&gt;
      &lt;Grid Margin="0,0,0,6"
            HeightRequest="20"&gt;
          &lt;Frame Padding="2"
                 BackgroundColor="#f1f1f1"
                 CornerRadius="5"&gt;
              &lt;Label Grid.Row="0"
                     Grid.Column="1"
                     FontSize="11"
                     Text="some text"
                     TextColor="DarkGray" /&gt;
          &lt;/Frame&gt;
      &lt;/Grid&gt;
  &lt;/FlexLayout&gt;
  </code></pre>
  
  <p>Here everything is binding ok but the appearance is like a ListView:</p>
  
  <p>in code behind:</p>
  
  <pre><code>xEspecialidades.ItemsSource = StringCollection;
  </code></pre>
  
  <p>in XAML:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;FlexLayout Grid.Row="5"
              Grid.Column="0"
              Margin="10,15,10,5"
              HorizontalOptions="FillAndExpand"
              VerticalOptions="StartAndExpand"&gt;
      &lt;CollectionView x:Name="xEspecialidades"
                      x:FieldModifier="public static"
                      HorizontalOptions="FillAndExpand"
                      HorizontalScrollBarVisibility="Never"
                      VerticalOptions="StartAndExpand"
                      VerticalScrollBarVisibility="Never"&gt;
          &lt;CollectionView.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Grid Margin="0,0,0,6"
                        HeightRequest="20"&gt;
                      &lt;Frame Padding="2"
                             BackgroundColor="#f1f1f1"
                             CornerRadius="5"&gt;
                          &lt;Label Grid.Row="0"
                                 Grid.Column="1"
                                 FontSize="11"
                                 Text="{Binding .}"
                                 TextColor="DarkGray" /&gt;
                      &lt;/Frame&gt;
                  &lt;/Grid&gt;
              &lt;/DataTemplate&gt;
          &lt;/CollectionView.ItemTemplate&gt;
      &lt;/CollectionView&gt;
  &lt;/FlexLayout&gt;
  </code></pre>
  
  <p>I've found this thread <a href="https://github.com/xamarin/Xamarin.Forms/issues/8234" rel="nofollow noreferrer">https://github.com/xamarin/Xamarin.Forms/issues/8234</a>
  but could not make it work. Visual Studio keeps saying that FlexItemsLayout
  is not found. Is there a way to do what I want?</p>