<Window
    x:Class="XHWK.WKTool.AppUpdateWin"
    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:views="clr-namespace:Common.system"
    Title="AppUpdateWin"
    Width="480"
    Height="330"
    AllowsTransparency="True"
    Background="Transparent"
    MouseLeftButtonDown="Window_MouseLeftButtonDown_1"
    ShowInTaskbar="False"
    Topmost="True"
    WindowStartupLocation="CenterScreen"
    WindowStyle="None"
    mc:Ignorable="d">

    <Grid>
        <views:ZJClippingBorder
            Margin="0"
            Background="#fafafa"
            BorderBrush="#3f6fff"
            BorderThickness="1"
            CornerRadius="0">

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="44" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="64" />
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Orientation="Horizontal">
                    <Image
                        Width="26"
                        Margin="10,5,0,0"
                        VerticalAlignment="Center"
                        Source="/Images/APP.png" />

                    <TextBlock
                        Margin="10,0,0,0"
                        VerticalAlignment="Center"
                        FontSize="24"
                        Foreground="#333333"
                        Text="应用更新" />
                </StackPanel>
                <ScrollViewer
                    Name="ContentSv"
                    Grid.Row="1"
                    Margin="10,10,10,10"
                    HorizontalScrollBarVisibility="Disabled"
                    VerticalScrollBarVisibility="Auto">
                    <TextBlock
                        x:Name="AppmsgTb"
                        Margin="10,10,10,10"
                        FontSize="14"
                        Foreground="#333333"
                        LineHeight="30"
                        Text="{Binding appModel.versioncomm}" />
                </ScrollViewer>

                <UniformGrid
                    x:Name="ButtonBottom"
                    Grid.Row="2"
                    Columns="2"
                    Rows="1">
                    <Button
                        Width="190"
                        Height="42"
                        Click="Button_Click"
                        Content="取消"
                        Cursor="Hand"
                        FontSize="20"
                        Foreground="White">
                        <Button.Template>
                            <ControlTemplate TargetType="{x:Type Button}">
                                <Border
                                    BorderBrush="{TemplateBinding Control.BorderBrush}"
                                    BorderThickness="0"
                                    CornerRadius="21">
                                    <Border.Background>#E9E9E9</Border.Background>
                                    <ContentPresenter
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Content="{TemplateBinding ContentControl.Content}" />
                                </Border>
                            </ControlTemplate>
                        </Button.Template>
                    </Button>
                    <Button
                        Width="190"
                        Height="42"
                        Click="gengxinClick"
                        Content="更新"
                        Cursor="Hand"
                        FontSize="20"
                        Foreground="White">
                        <Button.Template>
                            <ControlTemplate TargetType="{x:Type Button}">
                                <Border
                                    BorderBrush="{TemplateBinding Control.BorderBrush}"
                                    BorderThickness="0"
                                    CornerRadius="21">
                                    <Border.Background>#3f6fff</Border.Background>
                                    <ContentPresenter
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Content="{TemplateBinding ContentControl.Content}" />
                                </Border>
                            </ControlTemplate>
                        </Button.Template>
                    </Button>
                </UniformGrid>

                <Grid
                    x:Name="ProgressSp"
                    Grid.Row="1"
                    Grid.RowSpan="2"
                    Visibility="Collapsed">
                    <StackPanel
                        Height="Auto"
                        VerticalAlignment="Center"
                        Orientation="Vertical">
                        <TextBlock
                            x:Name="ParogressTb"
                            Margin="10,10,10,10"
                            HorizontalAlignment="Center"
                            FontSize="23"
                            Foreground="#333333"
                            LineHeight="30"
                            Text="正在更新，已下载0%" />

                        <views:ZJClippingBorder
                            Height="12"
                            Margin="20,20,20,20"
                            CornerRadius="6"
                            SnapsToDevicePixels="True">
                            <ProgressBar
                                x:Name="Mprogress"
                                BorderThickness="0"
                                Foreground="#3f6fff"
                                Maximum="100"
                                Minimum="0" Cursor="" />
                        </views:ZJClippingBorder>
                    </StackPanel>
                </Grid>
            </Grid>
        </views:ZJClippingBorder>
    </Grid>
</Window>
