plcsharp/PLCSharpWpf/VVMs/Authority/PasswordChange.xaml

47 lines
2.5 KiB
XML

<UserControl x:Class="PLCSharp.VVMs.Authority.PasswordChange"
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:PLCSharp.VVMs.Authority"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:myControl="clr-namespace:PLCSharp.Core.UserControls"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:PasswordChangeViewModel}"
Width="600" Height="300">
<Grid>
<Grid Width="600" Height="300">
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
<RowDefinition Height="2*" />
<RowDefinition Height="2*" />
<RowDefinition Height="2*" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<TextBlock Name="UserName"
d:Text="Admin"
Text="{Binding Name}"
HorizontalAlignment="Center" VerticalAlignment="Center" />
<StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
<TextBlock Text="密码:" />
<myControl:PasswordBoxNew Width="200" Text="{Binding Model.Password}" />
</StackPanel>
<StackPanel Grid.Row="2"
HorizontalAlignment="Center" VerticalAlignment="Center"
Orientation="Horizontal" Visibility="Collapsed">
<TextBlock Text="确认:" />
<myControl:PasswordBoxNew Width="200" Text="{Binding Model.PasswordAct}" />
</StackPanel>
<TextBlock Grid.Row="3"
d:Text="两次输入不一致"
Text="{Binding Model.PasswordMsg}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="Red" />
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
<Button Command="{Binding Model.ChangePassword}" Content="修改密码" />
</StackPanel>
</Grid>
</Grid>
</UserControl>