<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
    x:Class="Plugin.Glypher.Sample.MainPage"
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:fontAwesome5Free="clr-namespace:Plugin.Glypher.FontAwesome5Free;assembly=Plugin.Glypher.FontAwesome5Free"
    xmlns:glypher="clr-namespace:Plugin.Glypher;assembly=Plugin.Glypher"
    xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
    xmlns:local="clr-namespace:Sample"
    xmlns:weatherIcons="clr-namespace:Plugin.Glypher.WeatherIcons;assembly=Plugin.Glypher.WeatherIcons"
    ios:Page.UseSafeArea="True">

    <NavigationPage.TitleView>
        <Grid>
            <Grid.Resources>
                <ResourceDictionary>
                    <Style x:Key="ToolbarTitle" TargetType="Label">
                        <Setter Property="VerticalTextAlignment" Value="Center" />
                        <Setter Property="HorizontalTextAlignment" Value="{x:OnPlatform iOS=Center}" />
                        <Setter Property="TextColor" Value="{x:OnPlatform Android=White}" />
                        <Setter Property="FontAttributes" Value="Bold" />
                        <Setter Property="FontSize" Value="18" />
                    </Style>
                </ResourceDictionary>
            </Grid.Resources>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <Label
                Grid.Column="0"
                Style="{StaticResource ToolbarTitle}"
                Text="Title" />
            <StackLayout Grid.Column="1" Orientation="Horizontal">
                <StackLayout.Resources>
                    <ResourceDictionary>
                        <Style BasedOn="{StaticResource ToolbarTitle}" TargetType="Label">
                            <Setter Property="Margin" Value="5,0" />
                            <Setter Property="FontSize" Value="Large" />
                        </Style>
                    </ResourceDictionary>
                </StackLayout.Resources>

                <Label x:Name="ToolbarItemLabel" glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphListSolid.Fas_Redo}">
                    <Label.GestureRecognizers>
                        <TapGestureRecognizer Tapped="Redo_Tapped" />
                    </Label.GestureRecognizers>
                </Label>
            </StackLayout>
        </Grid>
    </NavigationPage.TitleView>

    <StackLayout>
        <Label
            HorizontalOptions="Center"
            Text="Welcome to Plugin Glypher!"
            VerticalOptions="CenterAndExpand" />

        <Label
            glypher:FontGlyph.Glyph="{x:Static weatherIcons:GlyphList.Wi_Cloudy}"
            FontSize="48"
            HorizontalOptions="Center"
            TextColor="Purple"
            VerticalOptions="CenterAndExpand" />

        <!--<Grid HorizontalOptions="Center" VerticalOptions="CenterAndExpand">
            <Label
                glypher:FontGlyph.Glyph="{x:Static fontAwesome5Pro:GlyphListDuotone.Fad_Crow_Primary}"
                FontSize="48"
                HorizontalTextAlignment="Center"
                TextColor="CornflowerBlue" />
            <Label
                glypher:FontGlyph.Glyph="{x:Static fontAwesome5Pro:GlyphListDuotone.Fad_Crow_Secondary}"
                FontSize="48"
                HorizontalTextAlignment="Center"
                TextColor="Goldenrod" />
        </Grid>-->

        <Label
            x:Name="Label1"
            glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphListBrands.Fab_Bluetooth}"
            FontSize="48"
            HorizontalOptions="Center"
            TextColor="CornflowerBlue"
            VerticalOptions="CenterAndExpand" />
        <Label
            x:Name="Label2"
            glypher:FontGlyph.Glyph="far-angry"
            FontSize="48"
            HorizontalOptions="Center"
            TextColor="LightSeaGreen"
            VerticalOptions="CenterAndExpand" />

        <Button
            x:Name="Button1"
            glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphListBrands.Fab_Bitcoin}"
            FontSize="48"
            HorizontalOptions="Center"
            TextColor="IndianRed"
            VerticalOptions="CenterAndExpand" />

        <Image HorizontalOptions="Center" VerticalOptions="CenterAndExpand">
            <Image.Source>
                <FontImageSource
                    glypher:FontGlyph.Glyph="{x:Static fontAwesome5Free:GlyphListRegular.Far_Address_Book}"
                    Size="48"
                    Color="Orange" />
            </Image.Source>
        </Image>
    </StackLayout>
</ContentPage>