<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:ap="http://avantipoint.com/mobiletoolkit"
             xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
             ios:Page.UseSafeArea="True"
             Title="Mappings"
             x:Class="SampleFonts.Mappings">
  <ContentPage.IconImageSource>
    <ap:IconImageSource Name="{x:Static ap:FontAwesomeRegular.Map}" Size="32" />
  </ContentPage.IconImageSource>
  <ContentPage.ToolbarItems>
    <ToolbarItem Text="Login"
                 IconImageSource="{ap:IconImageSource {x:Static ap:FontAwesomeSolid.SignInAlt}, Color=Black, Size='25'}" />
  </ContentPage.ToolbarItems>
  <ScrollView>
    <StackLayout>
      <Label Text="Labels" />
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="50" />
          <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Label Text="{ap:Icon IconName={x:Static ap:FontAwesomeRegular.User}}" />
        <Label Text="Font Awesome Regular - User"
               Grid.Column="1" />

        <Label Text="{ap:Icon {x:Static ap:FontAwesomeSolid.User}}"
               Grid.Row="1" />
        <Label Text="Font Awesome Solid - User"
               Grid.Row="1"
               Grid.Column="1" />

        <Label Text="{ap:Icon {x:Static ap:FontAwesomeBrands.Github}}"
               Grid.Row="2" />
        <Label Text="Font Awesome Brands - Github"
               Grid.Row="2"
               Grid.Column="1" />
      </Grid>
      <Label Text="Spans" />
      <Label>
        <Label.FormattedText>
          <FormattedString>
            <ap:IconSpan GlyphName="{x:Static ap:FontAwesomeRegular.User}" />
            <Span Text="    Font Awesome Regular - User" />
          </FormattedString>
        </Label.FormattedText>
      </Label>
      <Label>
        <Label.FormattedText>
          <FormattedString>
            <ap:IconSpan GlyphName="{x:Static ap:FontAwesomeSolid.User}" />
            <Span Text="    Font Awesome Solid - User" />
          </FormattedString>
        </Label.FormattedText>
      </Label>
      <Label>
        <Label.FormattedText>
          <FormattedString>
            <ap:IconSpan GlyphName="{x:Static ap:FontAwesomeBrands.Github}" />
            <Span Text="    Font Awesome Brands - GitHub" />
          </FormattedString>
        </Label.FormattedText>
      </Label>

      <Label Text="Buttons" />
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="50" />
          <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Button Text="{ap:Icon {x:Static ap:FontAwesomeRegular.User}}" />
        <Label Text="Font Awesome Regular - User"
               Grid.Column="1" />

        <Button Text="{ap:Icon {x:Static ap:FontAwesomeSolid.User}}"
               Grid.Row="1" />
        <Label Text="Font Awesome Solid - User"
               Grid.Row="1"
               Grid.Column="1" />

        <Button Text="{ap:Icon {x:Static ap:FontAwesomeBrands.Github}}"
               Grid.Row="2" />
        <Label Text="Font Awesome Brands - Github"
               Grid.Row="2"
               Grid.Column="1" />
      </Grid>
      <Label Text="Image Source" />
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="50" />
          <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Image HeightRequest="40"
               Aspect="AspectFit">
          <Image.Source>
            <ap:IconImageSource Name="{x:Static ap:FontAwesomeRegular.User}"
                                Size="40"
                                Color="Black" />
          </Image.Source>
        </Image>
        <Label Text="Font Awesome Regular - User"
               Grid.Column="1" />

        <Image HeightRequest="40"
               Aspect="AspectFit"
               BackgroundColor="Gray"
               WidthRequest="60"
               Grid.Row="1">
          <Image.Source>
            <ap:IconImageSource Name="{x:Static ap:FontAwesomeSolid.User}"
                                Size="40"
                                Color="White" />
          </Image.Source>
        </Image>
        <Label Text="Font Awesome Solid - User"
               Grid.Row="1"
               Grid.Column="1" />

        <Image HeightRequest="40"
               Aspect="AspectFit"
               Grid.Row="2">
          <Image.Source>
            <ap:IconImageSource Name="{x:Static ap:FontAwesomeBrands.Github}"
                                Size="40"
                                Color="Black" />
          </Image.Source>
        </Image>
        <Label Text="Font Awesome Brands - Github"
               Grid.Row="2"
               Grid.Column="1" />
      </Grid>
      <Label Text="Image Source - Extension" />
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="50" />
          <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Image Source="{ap:IconImageSource {x:Static ap:FontAwesomeRegular.User}, Size=40, Color=Black}" />
        <Label Text="Font Awesome Regular - User"
               Grid.Column="1" />

        <Image Source="{ap:IconImageSource {x:Static ap:FontAwesomeSolid.User}, Size=40, Color=White}"
               BackgroundColor="Gray"
               Grid.Row="1" />
        <Label Text="Font Awesome Solid - User"
               Grid.Row="1"
               Grid.Column="1" />

        <Image Source="{ap:IconImageSource {x:Static ap:FontAwesomeBrands.Github}, Size=40, Color=Black}"
               Grid.Row="2" />
        <Label Text="Font Awesome Brands - Github"
               Grid.Row="2"
               Grid.Column="1" />
      </Grid>
    </StackLayout>
  </ScrollView>
</ContentPage>
