<Page x:Class="NEIntelligentControl2.Pages.User.PageUserEdit"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:NEIntelligentControl2.Pages.User"
      xmlns:usr="clr-namespace:NEIntelligentControl2.Views.User"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="PageUserEdit">

    <Page.Resources>
        <Style x:Key="TextBlockStyleMain" TargetType="TextBlock">
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="FontSize" Value="14"/>
        </Style>
    </Page.Resources>

    <Grid Margin="30,0" x:Name="_gd">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="27"/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="27"/>
            <RowDefinition Height="7"/>
        </Grid.RowDefinitions>
        <TextBlock Text="用户注册" x:Name="_TBPageTitle" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16"/>

        <TextBlock Grid.Row="1" x:Name="_TBTitle" TextWrapping="Wrap" HorizontalAlignment="Center" FontSize="12" Foreground="#FFFF5200" VerticalAlignment="Center"/>

        <Grid Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>

            <TextBlock Text="用户名：" Style="{StaticResource TextBlockStyleMain}"/>
            <TextBox Grid.Row="1" x:Name="_TBUserName" Text="{Binding UserName}" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" FontSize="14"/>
        </Grid>

        <Grid Grid.Row="3">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>

            <TextBlock Text="姓名：" Style="{StaticResource TextBlockStyleMain}"/>
            <TextBox Grid.Row="1" x:Name="_TBName" Text="{Binding Name}" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" FontSize="14"/>
        </Grid>

        <Grid Grid.Row="4">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>

            <TextBlock Text="新密码：" Style="{StaticResource TextBlockStyleMain}"/>
            <PasswordBox x:Name="_TBPassword" Grid.Row="1" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" FontSize="14"/>
        </Grid>

        <Grid Grid.Row="5">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>

            <TextBlock Text="电话：" Style="{StaticResource TextBlockStyleMain}"/>
            <TextBox x:Name="_Phone" Text="{Binding Telephone}" Grid.Row="1" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" FontSize="14"/>
        </Grid>

        <Grid Grid.Row="7">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <ComboBox Text="选择指纹" x:Name="_CBMain" SelectionChanged="_CBMain_SelectionChanged"/>

            <Grid Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <usr:FingerpointImage x:Name="_fi1" Margin="2"/>
                <usr:FingerpointImage x:Name="_fi2" Grid.Column="1" Margin="2"/>
                <usr:FingerpointImage x:Name="_fi3" Grid.Column="2" Margin="2"/>
            </Grid>
        </Grid>
        
        <Button Grid.Row="9" Content="提 交" Click="Button_Click" Tag="submit" IsDefault="True"/>
    </Grid>
</Page>
