<Window x:Class="SyncTrayzor.Pages.NewVersionAlertView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:s="https://github.com/canton7/Stylet"
        xmlns:l="clr-namespace:SyncTrayzor.Localization"
        xmlns:xaml="clr-namespace:SyncTrayzor.Xaml"
        Width="600" MaxHeight="600"
        Title="{l:Loc NewVersionAlertView_Title}"
        SizeToContent="Height"
        MinHeight="250" MinWidth="500"
        FlowDirection="{x:Static l:Localizer.FlowDirection}">
    <DockPanel Margin="10">
        <TextBlock DockPanel.Dock="Top" TextWrapping="Wrap">
            <ContentControl Content="{l:Loc NewVersionAlertView_NewVersionAvailable, ValueBinding={Binding Version}}"/>
        </TextBlock>
        <TextBlock DockPanel.Dock="Top" Margin="0,10,0,0" Text="{l:Loc NewVersionAlertView_Changelog}"/>
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,15,0,0">
            <StackPanel.Resources>
                <Style TargetType="Button" BasedOn="{StaticResource DialogButton}">
                    <Setter Property="Padding" Value="15,0"/>
                    <!-- Slightly smaller -->
                </Style>
            </StackPanel.Resources>
            <Button IsDefault="True" Command="{s:Action Install}"
                    Visibility="{Binding CanInstall, Converter={x:Static s:BoolToVisibilityConverter.Instance}}">
                <StackPanel Orientation="Horizontal">
                    <Image Source="{x:Static xaml:UacImageSource.Shield}" VerticalAlignment="Center" Height="17" Margin="0,0,5,0"
                           Visibility="{Binding ShowUacBadge, Converter={x:Static s:BoolToVisibilityConverter.Instance}}"/>
                    <TextBlock Text="{l:Loc NewVersionAlertView_Button_Install}"/>
                </StackPanel>
            </Button>
            <Button IsDefault="True" Command="{s:Action Download}" Content="{l:Loc NewVersionAlertView_Button_Download}"
                    Visibility="{Binding CanInstall, Converter={x:Static s:BoolToVisibilityConverter.InverseInstance}}"/>
            <Button IsCancel="True" Command="{s:Action RemindLater}" Content="{l:Loc NewVersionAlertView_Button_RemindLater}"/>
            <Button Command="{s:Action DontRemind}" Content="{l:Loc NewVersionAlertView_Button_DontRemind}"/>
        </StackPanel>
        <TextBlock DockPanel.Dock="Bottom" TextWrapping="Wrap" Margin="0,10,0,0" Text="{l:Loc NewVersionAlertView_DontRemindMeExplanation}"/>

        <TextBox IsReadOnly="True" TextWrapping="Wrap" Text="{Binding Changelog}"
                 ScrollViewer.VerticalScrollBarVisibility="Auto"/>
    </DockPanel>
</Window>
