<Window
    x:Class="BPASmartClient.DialogWindow.NewShopWindow"
    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:local="clr-namespace:BPASmartClient.DialogWindow"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
    xmlns:vm="clr-namespace:BPASmartClient.ViewModel;assembly=BPASmartClient.ViewModel"
    Title="NewShopWindow"
    Width="400"
    Height="300"
    AllowsTransparency="True"
    Background="{x:Null}"
    Opacity="0.8"
    Topmost="True"
    WindowStartupLocation="CenterScreen"
    WindowStyle="None"
    mc:Ignorable="d">

    <Window.DataContext>
        <vm:NewShopWindowModel />
    </Window.DataContext>

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
                    <SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
                    <SolidColorBrush x:Key="TitleFontColor" Color="#ddd" />
                    <SolidColorBrush x:Key="CursorColor" Color="Aqua" />
                    <SolidColorBrush x:Key="TitleBorderColor" Color="#552AB2E7" />
                    <SolidColorBrush x:Key="TextBlockForeground" Color="#9934F7F7" />

                    <Style x:Key="buttonStyle" TargetType="Button">
                        <Setter Property="FontFamily" Value="楷体" />
                        <Setter Property="Width" Value="100" />
                        <Setter Property="FontSize" Value="18" />
                        <Setter Property="Foreground" Value="Aqua" />
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="Button">
                                    <Grid x:Name="gr">
                                        <ContentControl
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Content="{TemplateBinding Content}"
                                            Foreground="{TemplateBinding Foreground}" />
                                        <Polygon
                                            x:Name="poly"
                                            Points="0 0,80 0,100 30,20 30"
                                            Stroke="#FF34F7F7"
                                            StrokeThickness="2" />
                                    </Grid>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter TargetName="poly" Property="Fill" Value="#2234F7F7" />
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>

                    <Style x:Key="TextBlockStyle" TargetType="TextBlock">
                        <Setter Property="FontFamily" Value="楷体" />
                        <Setter Property="FontSize" Value="18" />
                        <Setter Property="Background" Value="Transparent" />
                        <Setter Property="Foreground" Value="Aqua" />
                        <Setter Property="VerticalAlignment" Value="Center" />
                        <Setter Property="HorizontalAlignment" Value="Center" />
                    </Style>

                    <!--<Style x:Key="TextBoxStyle" TargetType="TextBox">
                        <Setter Property=""
                    </Style>-->

                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid Background="#103153">
        <Grid.RowDefinitions>
            <RowDefinition Height="35" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <!--#region 标题栏设置-->
        <Border
            x:Name="MoveBorder"
            Height="35"
            VerticalAlignment="Top"
            Background="#0C2349"
            BorderBrush="#55ffffff"
            BorderThickness="0,0,0,1">
            <StackPanel Orientation="Horizontal">
                <Image Margin="15,5,0,5" Source="pack://application:,,,/BPASmartClient.CustomResource;component/Image/HBL.png" />
                <TextBlock
                    Name="tbTitle"
                    Margin="10,0"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    FontSize="18"
                    Foreground="White"
                    Text="新建店铺设备" />
            </StackPanel>
        </Border>

        <UniformGrid
            Width="150"
            Height="30"
            HorizontalAlignment="Right"
            Columns="3">
            <Button
                Name="ButMin"
                Content="&#xe664;"
                Style="{StaticResource TitleBarStyle}"
                Visibility="Hidden" />
            <Button
                Name="ButMax"
                Content="&#xe65d;"
                Style="{StaticResource TitleBarStyle}"
                Visibility="Hidden" />
            <Button
                Name="ButClose"
                Command="{Binding CancelCommand}"
                Content="X"
                FontSize="30"
                Style="{StaticResource TitleBarStyle}" />
        </UniformGrid>
        <!--#endregion-->

        <Grid Grid.Row="1">
            <Grid Margin="10">

                <Grid.RowDefinitions>
                    <RowDefinition Height="30" />
                    <RowDefinition Height="30" />
                    <RowDefinition Height="30" />
                    <RowDefinition Height="60" />
                    <RowDefinition Height="30" />
                </Grid.RowDefinitions>

                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.6*" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <TextBlock
                        HorizontalAlignment="Right"
                        Style="{StaticResource TextBlockStyle}"
                        Text="请输入店铺名称：" />

                    <TextBox
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        Background="Transparent"
                        BorderBrush="#FF23CACA"
                        CaretBrush="Aqua"
                        FontFamily="楷体"
                        FontSize="21"
                        Foreground="#ff34f7f7"
                        Text="{Binding ShopName}" />
                </Grid>

                <Grid Grid.Row="2">

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.6*" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <TextBlock
                        Grid.Column="0"
                        HorizontalAlignment="Right"
                        Style="{StaticResource TextBlockStyle}"
                        Text="请输入店铺ID：" />

                    <TextBox
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        Background="Transparent"
                        BorderBrush="#FF23CACA"
                        CaretBrush="Aqua"
                        FontFamily="楷体"
                        FontSize="21"
                        Foreground="#ff34f7f7"
                        Text="{Binding ShopId}" />

                </Grid>

                <TextBlock
                    Grid.Row="3"
                    Margin="10,0,0,0"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    FontFamily="楷体"
                    FontSize="20"
                    Foreground="Red"
                    Text="{Binding ErrorInfo}" />

                <Grid Grid.Row="4">

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <Button
                        Grid.Column="0"
                        VerticalAlignment="Center"
                        Command="{Binding CancelCommand}"
                        Content="取消"
                        Style="{StaticResource buttonStyle}" />

                    <Button
                        Grid.Column="1"
                        VerticalAlignment="Center"
                        Command="{Binding DefineCommand}"
                        Content="确认"
                        Style="{StaticResource buttonStyle}" />
                </Grid>

            </Grid>
        </Grid>
        <!--#endregion-->

        <!--#region 信息取-->

        <!--#endregion-->

    </Grid>
</Window>
