<v:ChromelessWindow xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:v="using:SourceGit.Views"
                    mc:Ignorable="d" d:DesignWidth="520" d:DesignHeight="230"
                    x:Class="SourceGit.Views.About"
                    x:Name="ThisControl"
                    Icon="/App.ico"
                    Title="{DynamicResource Text.About}"
                    Width="520" Height="230"
                    CanResize="False"
                    WindowStartupLocation="CenterOwner">
  <Grid RowDefinitions="Auto,*">
    <!-- TitleBar -->
    <Grid Grid.Row="0" Height="28" IsVisible="{Binding !#ThisControl.UseSystemWindowFrame}">
      <Border Background="{DynamicResource Brush.TitleBar}"
              BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
              PointerPressed="BeginMoveWindow"/>

      <Path Width="14" Height="14"
            Margin="10,0,0,0"
            HorizontalAlignment="Left"
            Data="{StaticResource Icons.Info}"
            IsVisible="{OnPlatform True, macOS=False}"/>

      <TextBlock Classes="bold"
                 Text="{DynamicResource Text.About}"
                 HorizontalAlignment="Center" VerticalAlignment="Center"
                 IsHitTestVisible="False"/>

      <v:CaptionButtons HorizontalAlignment="Right"
                        IsCloseButtonOnly="True"
                        IsVisible="{OnPlatform True, macOS=False}"/>
    </Grid>

    <Grid Grid.Row="1" Height="200" ColumnDefinitions="Auto,Auto">
      <Image Grid.Column="0"
             Width="200" Height="200"
             Margin="8,0"
             Source="/App.ico"
             HorizontalAlignment="Center"
             VerticalAlignment="Center"/>

      <StackPanel Grid.Column="1" Orientation="Vertical" VerticalAlignment="Center">
        <StackPanel Height="40" Orientation="Horizontal">
          <TextBlock Classes="bold" Text="SourceGit" FontSize="32" />
          <Border Margin="12,0,0,0" Height="20" CornerRadius="10" Background="{DynamicResource Brush.Accent}" Effect="drop-shadow(0 0 6 #40000000)">
            <TextBlock x:Name="TxtVersion" Classes="primary" Margin="8,0" FontSize="12" Foreground="White"/>
          </Border>
        </StackPanel>

        <TextBlock Margin="2,4,0,0" Text="{DynamicResource Text.About.SubTitle}" FontSize="16"/>

        <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
          <Button Width="18" Height="18" Classes="icon_button" Click="OnVisitWebsite" ToolTip.Tip="https://sourcegit-scm.github.io/">
            <Path Width="16" Height="16" Data="{StaticResource Icons.Remotes}"/>
          </Button>

          <Button Width="18" Height="18" Margin="8,0,0,0" Classes="icon_button" Click="OnVisitSourceCode" ToolTip.Tip="https://github.com/sourcegit-scm/sourcegit">
            <Path Width="16" Height="16" Data="{StaticResource Icons.Github}"/>
          </Button>
        </StackPanel>


        <TextBlock x:Name="TxtCopyright" Margin="0,40,0,0" Foreground="{DynamicResource Brush.FG2}"/>
      </StackPanel>
    </Grid>
  </Grid>

  <Window.KeyBindings>
    <KeyBinding Gesture="Escape" Command="{Binding #ThisControl.Close}"/>
  </Window.KeyBindings>

</v:ChromelessWindow>
