<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,*">
      <Image Grid.Column="0"
             Width="200" Height="200"
             Margin="8,0"
             Source="/App.ico"
             HorizontalAlignment="Center"
             VerticalAlignment="Center"/>

      <Grid Grid.Column="1" RowDefinitions="Auto,Auto,Auto,Auto,Auto" VerticalAlignment="Center">
        <StackPanel Grid.Row="0" 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)"
                  Cursor="Hand"
                  PointerPressed="OnVisitReleaseNotes"
                  ToolTip.Tip="{DynamicResource Text.About.ReleaseNotes}">
            <TextBlock x:Name="TxtVersion" Margin="8,0" FontSize="12" Foreground="White"/>
          </Border>
        </StackPanel>

        <Border Grid.Row="1" Margin="0,4,0,0">
          <TextBlock Text="{DynamicResource Text.About.SubTitle}" FontSize="16" TextWrapping="Wrap"/>
        </Border>

        <StackPanel Grid.Row="2" 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 Grid.Row="3" x:Name="TxtReleaseDate" Margin="0,28,0,0" Foreground="{DynamicResource Brush.FG2}"/>
        <TextBlock Grid.Row="4" x:Name="TxtCopyright" Margin="0,2,0,0" Foreground="{DynamicResource Brush.FG2}"/>
      </Grid>
    </Grid>
  </Grid>
</v:ChromelessWindow>
