<Window x:Class="ScreenToGif.Windows.Other.GraphicsConfigurationDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:n="clr-namespace:ScreenToGif.Controls"
        Title="{DynamicResource S.Warning.Graphics.Title}" WindowStartupLocation="CenterScreen" Topmost="True" SnapsToDevicePixels="True"
        Height="300" Width="560" MinHeight="500" MinWidth="500" SizeToContent="Height"
        Background="{DynamicResource Panel.Background}" Loaded="Window_Loaded">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" Background="{DynamicResource Panel.Background.Level4}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="40"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto" MinWidth="110"/>
            </Grid.ColumnDefinitions>

            <Border x:Name="IconBorder" Margin="6" Background="{DynamicResource Vector.Info}" Opacity="{DynamicResource Element.Opacity}"/>

            <TextBlock Grid.Column="1" x:Name="TypeTextBlock" Text="{DynamicResource S.Warning.Graphics.Title}" Margin="5,0" VerticalAlignment="Center" 
                       FontFamily="Segoe UI Semilight" FontSize="18" Foreground="{DynamicResource Element.Foreground.Header}"/>

            <n:ExtendedButton Grid.Column="2" x:Name="DetailsButton" Text="{DynamicResource S.Encoder.Details}" Icon="{DynamicResource Vector.Table}" 
                              ContentWidth="20" ContentHeight="20" Margin="3" Padding="2" Style="{StaticResource Style.Button.Horizontal}" TextWrapping="NoWrap"
                              Click="DetailsButton_Click" FontSize="14" FontFamily="Segoe UI Semilight"/>
        </Grid>

        <Grid Grid.Row="1" Margin="0,0,0,15">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <TextBlock Grid.Row="0" x:Name="HeaderTextBlock" Text="{DynamicResource S.Warning.Graphics.Instruction}" Foreground="{DynamicResource Element.Foreground.Header}" 
                       FontSize="18" Margin="10" HorizontalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap"/>

            <TextBlock Grid.Row="1" x:Name="DetailsTextBlock" Text="{DynamicResource S.Warning.Graphics.Message}" FontSize="16" Margin="6" TextWrapping="Wrap" 
                       Foreground="{DynamicResource Element.Foreground}" TextAlignment="Left" ScrollViewer.CanContentScroll="True"/>

            <Viewbox Grid.Row="2" Stretch="Uniform" StretchDirection="Both" Margin="10" VerticalAlignment="Center">
                <Canvas x:Name="MainCanvas" SizeChanged="MainCanvas_SizeChanged"/>
            </Viewbox>

            <TextBlock Grid.Row="3" x:Name="ActionTextBlock" Text="{DynamicResource S.Warning.Graphics.Action}" FontSize="16" Margin="6" TextWrapping="Wrap" 
                       Foreground="{DynamicResource Element.Foreground}" TextAlignment="Left" ScrollViewer.CanContentScroll="True"/>
            
            <TextBlock Grid.Row="4" x:Name="HyperlinkTextBlock" TextAlignment="Center" Margin="6,0,6,6">
                <Hyperlink Click="Hyperlink_Click">
                    <Run Text="{DynamicResource S.Warning.Graphics.Switch}" FontSize="16"/>
                </Hyperlink>
            </TextBlock>
        </Grid>

        <Grid Grid.Row="2" Background="{DynamicResource Panel.Background.Level3}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>

            <n:ExtendedButton Grid.Column="1" x:Name="OkButton" Text="{DynamicResource S.Ok}" Icon="{DynamicResource Vector.Ok}" ContentWidth="18" ContentHeight="18" 
                              Padding="5,0" MinWidth="90" Margin="5" IsDefault="True" Click="OkButton_Click"/>

            <n:ExtendedButton Grid.Column="2" x:Name="SendButton" Text="{DynamicResource S.ErrorDialog.Send}" Icon="{DynamicResource Vector.Email}" ContentWidth="18" ContentHeight="20" 
                              Padding="4,0" MinWidth="90" Margin="5" Click="SendButton_Click"/>
        </Grid>
    </Grid>
</Window>