PasswordPromptWindow.xaml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <Window x:Class="NetTool.Client.PasswordPromptWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. Title="输入管理密码"
  5. Width="420"
  6. SizeToContent="Height"
  7. ResizeMode="NoResize"
  8. WindowStartupLocation="CenterOwner">
  9. <Grid Margin="20,20,20,24">
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="Auto" />
  12. <RowDefinition Height="Auto" />
  13. <RowDefinition Height="Auto" />
  14. </Grid.RowDefinitions>
  15. <TextBlock x:Name="PromptTextBlock"
  16. Foreground="#111827"
  17. TextWrapping="Wrap" />
  18. <Grid Grid.Row="1"
  19. Margin="0,16,0,0">
  20. <PasswordBox x:Name="PasswordBox"
  21. MinHeight="36"
  22. Padding="0,0,36,0"
  23. VerticalContentAlignment="Center" />
  24. <TextBox x:Name="PasswordTextBox"
  25. MinHeight="36"
  26. Padding="0,0,36,0"
  27. VerticalContentAlignment="Center"
  28. TextChanged="PasswordTextBox_OnTextChanged"
  29. Visibility="Collapsed" />
  30. <Button x:Name="TogglePasswordVisibilityButton"
  31. Width="30"
  32. Height="30"
  33. Margin="0,3,3,3"
  34. Padding="0"
  35. HorizontalAlignment="Right"
  36. VerticalAlignment="Center"
  37. Background="Transparent"
  38. BorderThickness="0"
  39. Click="TogglePasswordVisibilityButton_OnClick"
  40. Content="&#xED1A;"
  41. Cursor="Hand"
  42. FontFamily="Segoe MDL2 Assets"
  43. FontSize="14"
  44. Foreground="#6B7280"
  45. ToolTip="查看密码" />
  46. </Grid>
  47. <Button x:Name="ClearPasswordButton"
  48. Grid.Row="2"
  49. Margin="0,20,0,0"
  50. Padding="0"
  51. HorizontalAlignment="Left"
  52. VerticalAlignment="Center"
  53. Background="Transparent"
  54. BorderThickness="0"
  55. Click="ClearPasswordButton_OnClick"
  56. Content="清除已保存密码"
  57. Cursor="Hand"
  58. FontSize="12"
  59. Foreground="#6B7280" />
  60. <StackPanel Grid.Row="2"
  61. Margin="0,20,0,0"
  62. HorizontalAlignment="Right"
  63. Orientation="Horizontal">
  64. <Button MinWidth="78"
  65. Height="36"
  66. Click="CancelButton_OnClick"
  67. Content="取消" />
  68. <Button MinWidth="78"
  69. Height="36"
  70. Margin="10,0,0,0"
  71. Style="{StaticResource PrimaryButtonStyle}"
  72. Click="OkButton_OnClick"
  73. Content="连接" />
  74. </StackPanel>
  75. </Grid>
  76. </Window>