schangxiang@126.com
2025-11-04 f5ed29dc26c7cd952d56ec5721a2efc43cd25992
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<UserControl x:Class="HxUserManagement.Views.EditUserInfo"
             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:HxUserManagement.Views"
             xmlns:str="clr-namespace:HxUserManagement.Properties"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800"
             Loaded="UserControl_Loaded">
 
    <Grid x:Name="root" Background="#01FFFFFF" PreviewMouseDown="Grid_PreviewMouseDown">
        <Border x:Name="border" Width="0" Visibility="Collapsed" HorizontalAlignment="Right" Background="White" BorderBrush="LightGray"
            BorderThickness="1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="200"/>
                </Grid.RowDefinitions>
                <Grid Grid.Row="0" Grid.ColumnSpan="2">
                    <TextBlock x:Name="title" Text="{x:Static str:Resources.strNewUser}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="20 0" FontSize="20"
                               Foreground="Black" FontWeight="Bold"/>
                    <Button Content="×" HorizontalAlignment="Right" VerticalAlignment="Center" VerticalContentAlignment="Center" Margin="10 0" FontSize="28" Width="40" Height="40"
                            FontWeight="Bold" Foreground="Black" Style="{DynamicResource BlueButtonStyle}" Background="White" Click="btnClose_Click" BorderThickness="0"/>
                    <Rectangle Height="1" Fill="Gray" VerticalAlignment="Bottom" Margin="15 0"/>
                </Grid>
 
                <TextBlock Grid.Row="2" Grid.Column="0" Text="{x:Static str:Resources.strUserName}" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                <TextBox x:Name="textboxUserName" Grid.Row="2" Grid.Column="1" Height="35" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" 
                     VerticalAlignment="Center" FontSize="16" Margin="10 0 100 0" TextChanged="textboxUserName_TextChanged" BorderBrush="DarkGray"
                         Text="{Binding UserName, Mode=TwoWay}"/>
                <TextBlock x:Name="usernameTips" Grid.Row="3" Grid.Column="1" Text="用户名不能为空" FontSize="14" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10 0"
                           Foreground="Red" Visibility="Collapsed"/>
 
                <TextBlock Grid.Row="4" Grid.Column="0" Text="{x:Static str:Resources.strPhone}" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                <TextBox x:Name="textboxPhone" Grid.Row="4" Grid.Column="1" Height="35" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" 
                     VerticalAlignment="Center" FontSize="16" Margin="10 0 100 0" MaxLength="11" TextChanged="textboxPhone_TextChanged" BorderBrush="DarkGray"
                         Text="{Binding Phone, Mode=TwoWay}"/>
                <TextBlock x:Name="phoneTips" Grid.Row="5" Grid.Column="1" Text="用户名不能为空" FontSize="14" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10 0"
                           Foreground="Red" Visibility="Collapsed"/>
 
                <TextBlock Grid.Row="6" Grid.Column="0" Text="{x:Static str:Resources.strMail}" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                <TextBox x:Name="textboxMail" Grid.Row="6" Grid.Column="1" Height="35" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" 
                     VerticalAlignment="Center" FontSize="16" Margin="10 0 100 0" TextChanged="textboxMail_TextChanged" BorderBrush="DarkGray"
                         Text="{Binding Email, Mode=TwoWay}"/>
                <TextBlock x:Name="emailTips" Grid.Row="7" Grid.Column="1" Text="用户名不能为空" FontSize="14" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10 0"
                           Foreground="Red" Visibility="Collapsed"/>
 
                <TextBlock Grid.Row="8" Grid.Column="0" Text="{x:Static str:Resources.strAccountStatus}" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                <ComboBox x:Name="comboxStatus" Grid.Row="8" Grid.Column="1" Height="35" VerticalContentAlignment="Center" FontSize="16" BorderBrush="DarkGray"
                      Background="White" IsEditable="False" Margin="10 0 100 0" SelectionChanged="comboxStatus_SelectionChanged"/>
 
                <TextBlock Grid.Row="10" Grid.Column="0" Text="{x:Static str:Resources.strRole}" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                <ComboBox x:Name="comboxRole" Grid.Row="10" Grid.Column="1" Height="35" VerticalContentAlignment="Center" FontSize="16" BorderBrush="DarkGray"
                      Background="White" IsEditable="False" Margin="10 0 100 0" DisplayMemberPath="Name" SelectionChanged="comboxRole_SelectionChanged"/>
 
                <Button Content="{x:Static str:Resources.strCancel}" x:Name="btnCancel" Grid.Row="13" Grid.Column="1" HorizontalAlignment="Right" 
                        Foreground="Black" Style="{DynamicResource BlueButtonStyle}" Background="White" BorderThickness="1" BorderBrush="Black"
                        Height="40" Width="100" Click="btnCancel_Click" FontSize="16" Margin="0 0 150 0" Visibility="Collapsed"/>
 
                <Button Content="{x:Static str:Resources.strSave}" x:Name="btnSave" Grid.Row="13" Grid.Column="1" HorizontalAlignment="Right" 
                        Foreground="White" Style="{DynamicResource BlueButtonStyle}" Background="{DynamicResource blueBrush}" BorderThickness="0"
                        Height="40" Width="100" Click="btnSave_Click" FontSize="16" Margin="0 0 20 0"/>
            </Grid>
        </Border>
    </Grid>
 
</UserControl>