ResetPassWordView.xaml 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <UserControl
  2. x:Class="ShakerManger.View.ResetPassWordView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:local="clr-namespace:ShakerManger.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:vm="clr-namespace:ShakerManger.ViewModel"
  10. Width="{x:Static SystemParameters.PrimaryScreenWidth}"
  11. Height="{x:Static SystemParameters.PrimaryScreenHeight}"
  12. d:DataContext="{d:DesignInstance {x:Type vm:ResetPassWordViewModel}}"
  13. d:DesignHeight="450"
  14. d:DesignWidth="800"
  15. Background="#AfAAAAAA"
  16. DataContext="{Binding Source={StaticResource MainViewModel}, Path=Data.SystemConfig.UserPage.ResetPassWord}"
  17. FontSize="14"
  18. Foreground="{StaticResource LableBrush}"
  19. mc:Ignorable="d">
  20. <Border
  21. HorizontalAlignment="Center"
  22. VerticalAlignment="Center"
  23. Background="{StaticResource MainBrush}"
  24. BorderBrush="{StaticResource AuxiliaryBrush}"
  25. BorderThickness="1"
  26. CornerRadius="6">
  27. <Grid Margin="60">
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="46" />
  30. <RowDefinition Height="46" />
  31. <RowDefinition Height="46" />
  32. <RowDefinition Height="46" />
  33. </Grid.RowDefinitions>
  34. <StackPanel Orientation="Horizontal">
  35. <TextBlock
  36. Width="120"
  37. HorizontalAlignment="Center"
  38. VerticalAlignment="Center"
  39. Text="请输入新密码:" />
  40. <hc:PasswordBox
  41. Width="220"
  42. Height="36"
  43. hc:PasswordBoxAttach.PasswordLength="20"
  44. Background="Transparent"
  45. CaretBrush="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}, Path=Foreground}"
  46. Foreground="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}, Path=Foreground}"
  47. IsSafeEnabled="False"
  48. ShowEyeButton="True"
  49. UnsafePassword="{Binding FirstPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  50. </StackPanel>
  51. <StackPanel Grid.Row="1" Orientation="Horizontal">
  52. <TextBlock
  53. Width="120"
  54. HorizontalAlignment="Center"
  55. VerticalAlignment="Center"
  56. Text="重复输入新密码:" />
  57. <hc:PasswordBox
  58. Width="220"
  59. Height="36"
  60. hc:PasswordBoxAttach.PasswordLength="20"
  61. Background="Transparent"
  62. CaretBrush="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}, Path=Foreground}"
  63. Foreground="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}, Path=Foreground}"
  64. IsSafeEnabled="False"
  65. ShowEyeButton="True"
  66. UnsafePassword="{Binding SecondPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  67. </StackPanel>
  68. <StackPanel
  69. Grid.Row="3"
  70. HorizontalAlignment="Center"
  71. VerticalAlignment="Center"
  72. Orientation="Horizontal">
  73. <Button
  74. Width="86"
  75. Height="36"
  76. hc:IconElement.Geometry="{StaticResource YesGeometry}"
  77. hc:IconElement.Height="20"
  78. hc:IconElement.Width="20"
  79. Command="{Binding OkCommand}"
  80. Content="确认"
  81. IsEnabled="{Binding CanOk}"
  82. Style="{StaticResource HasIconButton}" />
  83. <Button
  84. Width="86"
  85. Height="36"
  86. Margin="80,0,0,0"
  87. hc:IconElement.Geometry="{StaticResource NoGeometry}"
  88. hc:IconElement.Height="20"
  89. hc:IconElement.Width="20"
  90. Command="{Binding CancelCommand}"
  91. Content="取消"
  92. Style="{StaticResource HasIconButton}" />
  93. </StackPanel>
  94. </Grid>
  95. </Border>
  96. </UserControl>