<UserControl
    x:Class="BPASmartClient.DosingSystem.View.AdminstratorsView"
    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:helper="clr-namespace:BPASmartClient.DosingSystem.View.Helper"
    xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:uc="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
    xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
    d:DesignHeight="600"
    d:DesignWidth="800"
    Loaded="UserControl_Loaded"
    mc:Ignorable="d">
    <UserControl.DataContext>
        <vm:AdminstratorsViewModel />
    </UserControl.DataContext>
    <UserControl.Resources>
        <Style x:Key="TxLogin" TargetType="TextBlock">
            <Setter Property="FontSize" Value="20" />
            <Setter Property="Foreground" Value="#ddd" />
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <!--<Grid.ColumnDefinitions>
            <ColumnDefinition Width="7*" />
            <ColumnDefinition Width="10*" />
        </Grid.ColumnDefinitions>-->
        <!--<Grid.RowDefinitions>
            <RowDefinition Height="5*" />
            <RowDefinition Height="5*" />
            <RowDefinition Height="5*" />
            <RowDefinition Height="4*" />
            <RowDefinition Height="8*" />
            <RowDefinition Height="20*" />
        </Grid.RowDefinitions>-->

        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <!--#region 登录-->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.7*"/>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>

            <TextBlock
                HorizontalAlignment="Right"
                VerticalAlignment="Center"
                Foreground="#feffff"
                Style="{StaticResource TxLogin}"
                Text="权限：" />
            <ComboBox
                Grid.Column="1"
                Width="230"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                BorderBrush="#FF074B92"
                BorderThickness="1"
                FontFamily="楷体"
                FontSize="20"
                Foreground="#FF2AB2E7"
                IsEditable="False"
                ItemsSource="{Binding permission}"
                Style="{StaticResource ComboBoxStyle}"
                Text="{Binding SelectText}" />

            <TextBlock
                Grid.Row="1"
                HorizontalAlignment="Right"
                VerticalAlignment="Center"
                Foreground="#feffff"
                Style="{StaticResource TxLogin}"
                Text="账号：" />
            <TextBox
                x:Name="tbx_admin"
                Grid.Row="1"
                Grid.Column="1"
                Width="230"
                Height="28"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                HorizontalContentAlignment="Center"
                VerticalContentAlignment="Top"
                Background="Transparent"
                BorderBrush="White"
                BorderThickness="0,0,0,1"
                FontSize="20"
                Foreground="#F8F8FF"
                GotFocus="TextBox_GotFocus"
                Text="{Binding Admin, Mode=TwoWay}" />


            <TextBlock
                Grid.Row="2"
                HorizontalAlignment="Right"
                VerticalAlignment="Center"
                Foreground="#feffff"
                Style="{StaticResource TxLogin}"
                Text="密码：" />
            <PasswordBox
                x:Name="password"
                Grid.Row="2"
                Grid.Column="1"
                Width="230"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                HorizontalContentAlignment="Center"
                VerticalContentAlignment="Top"
                helper:PasswordBoxHelper.PasswordContent="{Binding Password, Mode=TwoWay}"
                Background="Transparent"
                BorderBrush="White"
                BorderThickness="0,0,0,1"
                CaretBrush="White"
                FontSize="16"
                Foreground="#F8F8FF"
                GotFocus="Password_GotFocus" />
            <TextBlock
                Grid.Row="3"
                Grid.ColumnSpan="2"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                FontFamily="楷体"
                FontSize="16"
                Foreground="#FFE2415C"
                Text="{Binding ErrorMessage}"
                TextWrapping="Wrap" />
            <Button
                Grid.Row="4"
                Grid.ColumnSpan="2"
                Width="120"
                Height="40"
                VerticalAlignment="Center"
                Background="Transparent"
                BorderBrush="#ff19b7ec"
                BorderThickness="2"
                Command="{Binding AdminLoginCommand}"
                Content="登  录"
                FontSize="28"
                Foreground="#9934F7F7"
                IsDefault="True" />

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

        <!--#region 密码修改-->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
        </Grid>
        <!--#endregion-->



        <uc:UserKeyBoard
            x:Name="myKeyboard"
            Grid.Row="5"
            Grid.ColumnSpan="2"
            Margin="100,10,100,50"
            Focusable="False" />
    </Grid>

</UserControl>
