<Window x:Class="MeterVision.Upgrade.WndUpdateAsk"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        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:zdfflatui="clr-namespace:ZdfFlatUI;assembly=WPF.UI"
        mc:Ignorable="d"
        BorderThickness="1"
        BorderBrush="#999999"
        ResizeMode="CanMinimize"
        WindowStyle="None"
        Background="WhiteSmoke"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner"
        Title="WndUpdateAsk" Height="420" Width="500">

    <Window.Resources>
        <PathGeometry x:Key="close" Figures="M1024 960l-64-0.64-448-447.36-448 447.36-64 0.64v-64l448-448-448-448v-64h64l448 448 448-448h64v64l-448 448 448 448v64z" />
    </Window.Resources>
    <Viewbox Stretch="Fill">
        <Grid Height="420" Width="500">
            <Grid.RowDefinitions>
                <RowDefinition Height="35" />
                <RowDefinition Height="*" />
                <RowDefinition Height="60" />
            </Grid.RowDefinitions>

            <Border Grid.Row="0" Background="#EFF2F6" MouseDown="Border_MouseDown">
                <Grid>
                    <StackPanel  VerticalAlignment="Center" Orientation="Horizontal" Margin="5 0 0 0">
                        <Image Source="/MeterVision;component/Assest/newVersion.png" Width="30" Height="30"  Stretch="Fill" Margin="0 0 2 0"  />
                        <TextBlock x:Name="txtNewVersion" Text="发现新版本" FontSize="16" VerticalAlignment="Center" />
                    </StackPanel>
                    <zdfflatui:PathTextButton x:Name="btnClose" Margin="0 0 10 0"  Background="Transparent" HorizontalAlignment="Right"
                                       Orientation="Horizontal" Foreground="Red" MouseOverForeground="Blue" PathWidth="15"
                                       PathData="{StaticResource close}" Click="BtnClose_Click"
                                       ContentMargin="0,0,0,0" IsEnabled="True" VerticalAlignment="Center" />
                </Grid>
            </Border>

            <Border Grid.Row="1" Margin="10" BorderThickness="1" BorderBrush="#C7C7C7" Background="White">
                <ScrollViewer>
                    <TextBlock x:Name="txtInfo" Text="版本2021.12.10.1更新内容" FontSize="20"
                           FontFamily="宋体" Margin="5" TextWrapping="Wrap" />
                </ScrollViewer>
            </Border>

            <StackPanel x:Name="pnlUpdate" Grid.Row="2" Margin="0 0 0 0" VerticalAlignment="Center" 
                        HorizontalAlignment="Right" Orientation="Horizontal" Visibility="Visible">
                <zdfflatui:FlatButton x:Name="btnIgnore" Content="忽略这次更新" 
                                      Width="150" Height="40" FontSize="16" Margin="0 0 20 0" 
                                      Background="White" Foreground="Black" Click="BtnIgnore_Click" />
                <zdfflatui:FlatButton x:Name="btnUpdate" Content="立即更新" 
                                      Width="150" Height="40" FontSize="16" Margin="0 0 20 0" 
                                      Background="#1AAD19" Foreground="White" Click="BtnUpdate_Click" />
            </StackPanel>
            <StackPanel x:Name="pnlProgress" Grid.Row="2" VerticalAlignment="Center" Visibility="Collapsed"
                        HorizontalAlignment="Left" Margin="10 0 0 0" Orientation="Vertical">
                <TextBlock x:Name="txtProgress" Text="已下载1%" VerticalAlignment="Center" 
                           HorizontalAlignment="Left" FontSize="14" Margin="0 0 0 5" />
                <ProgressBar x:Name="downProgress" Minimum="0" Maximum="100" Width="580" Height="20" Background="White"/>
            </StackPanel>
        </Grid>
    </Viewbox>
</Window>
