<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:local="clr-namespace:TabbedPageDemo;assembly=TabbedPageDemo"
            x:Class="TabbedPageDemo.TabbedPageDemoPage">

  <TabbedPage.Resources>
    <ResourceDictionary>
      <local:NonNullToBooleanConverter x:Key="booleanConverter" />
    </ResourceDictionary>
  </TabbedPage.Resources>

  <TabbedPage.ItemTemplate>
    <DataTemplate>
      <ContentPage Title="{Binding Name}" Icon="monkeyicon.png">
        <StackLayout Padding="5, 25">

          <!-- Name -->
          <Label Text="{Binding Name}"
                 Font="Bold,Large"
                 HorizontalOptions="Center" />

          <!-- Picture -->
          <Image Source="{Binding PhotoUrl}"
                 WidthRequest="200" 
                 HeightRequest="200" />

          <StackLayout Padding="50, 10">

            <!-- Family -->
            <StackLayout Orientation="Horizontal">
              <Label Text="Family:"
                     HorizontalOptions="FillAndExpand" />
              <Label Text="{Binding Family}"
                     Font="Bold,Medium" />
            </StackLayout>

            <!-- Subfamily -->
            <StackLayout Orientation="Horizontal"
                         IsVisible="{Binding Subfamily,
                            Converter={StaticResource booleanConverter}}">
              <Label Text="Subfamily:"
                     HorizontalOptions="FillAndExpand" />
              <Label Text="{Binding Subfamily}"
                     Font="Bold,Medium" />
            </StackLayout>

            <!-- Tribe -->
            <StackLayout Orientation="Horizontal"
                         IsVisible="{Binding Tribe,
                            Converter={StaticResource booleanConverter}}">
              <Label Text="Tribe:"
                      HorizontalOptions="FillAndExpand" />
              <Label Text="{Binding Tribe}"
                     Font="Bold,Medium" />
            </StackLayout>

            <!-- Genus -->
            <StackLayout Orientation="Horizontal">
              <Label Text="Genus:"
                     HorizontalOptions="FillAndExpand" />
              <Label Text="{Binding Genus}"
                     Font="Bold,Medium" />
            </StackLayout>
          </StackLayout>
        </StackLayout>
      </ContentPage>
    </DataTemplate>
  </TabbedPage.ItemTemplate>
</TabbedPage>