<Window x:Class="ScreenToGif.Windows.Other.DownloadDialog"
        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.Updater.Title}" Height="400" Width="700" MinHeight="300" MinWidth="450" MaxHeight="750" MaxWidth="700"
        SizeToContent="Height" WindowStartupLocation="CenterScreen" Background="{DynamicResource Panel.Background}" 
        Loaded="Window_Loaded" Closing="Window_Closing">

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

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

            <Border Margin="5" Width="32" Height="32" Background="{StaticResource Vector.Synchronize}" Opacity="{DynamicResource Element.Opacity}"/>

            <Label x:Name="InstructionLabel" Content="{DynamicResource S.Updater.Header}" Margin="3" Grid.Column="1" VerticalContentAlignment="Center" 
                   FontFamily="Segoe UI Semilight" FontSize="18" Foreground="{DynamicResource Element.Foreground.Header}"/>
        </Grid>

        <n:StatusBand Grid.Row="1" x:Name="StatusBand"/>

        <Grid Grid.Row="2">
            <FlowDocumentScrollViewer x:Name="DocumentViewer" VerticalScrollBarVisibility="Auto">
                <FlowDocument x:Name="MainFlowDocument" FontFamily="Segoe UI" TextAlignment="Left">
                    <Paragraph TextAlignment="Center" FontWeight="Light">
                        <Run Text="{DynamicResource S.Updater.NewRelease}" FontSize="30" Foreground="{DynamicResource Element.Foreground}"/>
                        <Run Name="VersionRun" Text="Version 2.22" FontSize="20" Foreground="{DynamicResource Element.Foreground}"/>
                        <Run Name="SizeRun" Text="1.1 MB" FontSize="14" Foreground="{DynamicResource Element.Foreground.Gray112}"/>
                        <LineBreak/>
                        <Run Name="TypeRun" Text="Portable" FontSize="15" Foreground="{DynamicResource Element.Foreground.Gray112}"/>
                    </Paragraph>

                    <Paragraph Name="WhatsNewParagraphTitle" FontSize="20" FontWeight="Regular" Margin="0" Foreground="{DynamicResource Element.Foreground}">
                        <Run Text="{DynamicResource S.Updater.Info.WhatsNew}"/>
                    </Paragraph>
                    <Paragraph Name="WhatsNewParagraph" FontSize="12" FontWeight="Regular" Margin="5" Foreground="{DynamicResource Element.Foreground}"/>

                    <Paragraph Name="FixesParagraphTitle" FontSize="16" FontWeight="Regular" Margin="0" Foreground="{DynamicResource Element.Foreground}">
                        <Run Text="{DynamicResource S.Updater.Info.BugFixes}"/>
                    </Paragraph>
                    <Paragraph Name="FixesParagraph" FontSize="12" FontWeight="Regular" Margin="5" Foreground="{DynamicResource Element.Foreground}"/>
                </FlowDocument>
            </FlowDocumentScrollViewer>
        </Grid>

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

            <ProgressBar Grid.Column="0" x:Name="DownloadProgressBar" Height="4" Margin="5,0" IsIndeterminate="True" Visibility="Hidden"/>
            <n:ExtendedCheckBox Grid.Column="0" x:Name="RunAfterwardsCheckBox" Text="{DynamicResource S.Updater.RunAfter}" Margin="5" Visibility="Collapsed"/>

            <n:ExtendedButton Grid.Column="1" x:Name="DownloadButton" Text="{DynamicResource S.Updater.Download}" Icon="{StaticResource Vector.Ok}" 
                              ContentWidth="18" ContentHeight="18" Padding="5,0" MinWidth="90" Margin="5" Click="DownloadButton_Click"/>
            <n:ExtendedButton Grid.Column="2" x:Name="CancelButton" Text="{DynamicResource S.Cancel}" Icon="{StaticResource Vector.Cancel}" 
                              ContentWidth="18" ContentHeight="18" Padding="5,0" MinWidth="90" Margin="5" IsCancel="True" Click="CancelButton_Click"/>
        </Grid>
    </Grid>
</Window>