<Window
    x:Class="XHWK.WKTool.UploadWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Views="clr-namespace:XHWK.WKTool.Helpers"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:XHWK.WKTool"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="UploadWindow"
    Width="457"
    Height="346"
    Margin="0"
    AllowsTransparency="True"
    BorderBrush="#eeeeee"
    BorderThickness="1"
    Loaded="Window_Loaded"
    WindowStartupLocation="CenterScreen"
    WindowStyle="None"
    mc:Ignorable="d">

    <Grid>
        <!--  分4行  -->
        <Grid.RowDefinitions>
            <RowDefinition Height="45" />
            <RowDefinition Height="30" />
            <RowDefinition Height="90" />
            <RowDefinition Height="90" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <!--  第一行 标题  -->
        <Grid
            x:Name="GridTitle"
            Grid.Row="0"
            Background="#3f6fff"
            MouseLeftButtonDown="Window_MouseLeftButtonDown"
            Visibility="Visible">
            <TextBlock
                Padding="10,13,0,0"
                FontSize="16"
                Foreground="#FFFFFF"
                Text="上传" />
            <Button
                x:Name="btnDown"
                Grid.Row="0"
                Width="45"
                Height="45"
                HorizontalAlignment="Right"
                Click="BtnDown_Click"
                Content="×"
                Cursor="Hand"
                FontSize="25"
                Foreground="#FFFFFF"
                 />
        </Grid>
        <Grid
            x:Name="GridTitle_Black"
            Grid.Row="0"
            Margin="0,0"
            Background="#FFE9E9E9"
            MouseLeftButtonDown="Window_MouseLeftButtonDown"
            Visibility="Collapsed">
            <TextBlock
                Padding="10,13,0,0"
                FontSize="16"
                Foreground="#FF333333"
                Text="上传" />
            <Button
                x:Name="btnDown_Black"
                Grid.Row="0"
                Padding="10,0,10,0"
                HorizontalAlignment="Right"
                Click="BtnDown_Click"
                Content="×"
                Cursor="Hand"
                FontSize="25"
                Foreground="#FF333333"
                 />
        </Grid>
        <!--  第三行 教材  -->
        <ComboBox
            x:Name="book_list"
            Grid.Row="2"
            Width="400"
            Height="50"
            Margin="0,0,0,0"
            Padding="10,0,0,0"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#FFCDD6E0"
            Cursor="Hand"
            DisplayMemberPath="Value"
            FontSize="16"
            Foreground="Black"
            ItemsSource="{Binding bookList}"
            SelectedValuePath="Key"
            SelectionChanged="toolbar_list_SelectionChanged">
            <ComboBox.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="White" />
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Gray" />
            </ComboBox.Resources>
        </ComboBox>
        <!--  章节  -->
        <ComboBox
            x:Name="cmbTeachingMaterial"
            Grid.Row="3"
            Width="400"
            Height="50"
            Padding="10,0,0,0"
            VerticalContentAlignment="Center"
            BorderBrush="#FFCDD6E0"
            Cursor="Hand"
            DisplayMemberPath="Value"
            FontSize="16"
            Foreground="Black"
            ItemsSource="{Binding zhangjieList}"
            SelectedValuePath="Key">
            <ComboBox.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="White" />
                <!--<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Green" />-->
            </ComboBox.Resources>
        </ComboBox>
        <!--  第四行 开始按钮  -->
        <Button
            x:Name="btnStart"
            Grid.Row="4"
            Width="400"
            Height="42"
            Margin="10,0,10,0"
            Click="BtnStart_Click"
            Content="确定"
            Cursor="Hand"
            FontSize="18"
            Foreground="#FFFFFF"
            IsDefault="True"
            >
            <Button.Template>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        BorderBrush="{TemplateBinding Control.BorderBrush}"
                        BorderThickness="1"
                        CornerRadius="21">
                        <Border.Background>#3f6fff</Border.Background>
                        <ContentPresenter
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Content="{TemplateBinding ContentControl.Content}" />
                    </Border>
                </ControlTemplate>
            </Button.Template>
        </Button>
        <Views:ZJClippingBorder
            x:Name="tip_outer"
            Grid.Row="0"
            Grid.RowSpan="2"
            Margin="0"
            Background="#FFE6EAF0"
            CornerRadius="4"
            Visibility="Collapsed">
            <Grid>
                <Label
                    Height="35"
                    Margin="0,7,0,0"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Top"
                    Content="上传中..."
                    FontSize="20" />
                <ProgressBar
                    x:Name="pgbProcess"
                    Grid.Row="0"
                    Height="20"
                    Margin="50,20,50,0"
                    BorderBrush="#4597FF"
                    Foreground="#4597FF"
                    Visibility="Visible" />
                <Label
                    x:Name="lbProcess"
                    Grid.Row="0"
                    Width="60"
                    Height="30"
                    Margin="0,20,0,0"
                    HorizontalAlignment="Center"
                    Content=""
                    FontSize="16"
                    Foreground="White"
                    Visibility="Visible" />
            </Grid>
        </Views:ZJClippingBorder>
    </Grid>
</Window>
