|
1 | | -<ui:Page |
| 1 | +<ui:Page |
2 | 2 | x:Class="iNKORE.UI.WPF.Modern.Gallery.Pages.Controls.Windows.PasswordBoxPage" |
3 | 3 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
10 | 10 | mc:Ignorable="d" Loaded="Page_Loaded"> |
11 | 11 | <ikw:SimpleStackPanel> |
12 | 12 | <local:ControlExample x:Name="Example1" HeaderText="A simple PasswordBox."> |
13 | | - <PasswordBox Width="300" /> |
| 13 | + <StackPanel> |
| 14 | + <PasswordBox |
| 15 | + Width="300" |
| 16 | + HorizontalAlignment="Left" |
| 17 | + AutomationProperties.Name="Simple PasswordBox" |
| 18 | + PasswordChanged="PasswordBox_PasswordChanged" /> |
| 19 | + <TextBlock |
| 20 | + x:Name="Control1Output" |
| 21 | + FontFamily="Global User Interface" |
| 22 | + Style="{StaticResource OutputTextBlockStyle}" |
| 23 | + Visibility="Collapsed" /> |
| 24 | + </StackPanel> |
14 | 25 | </local:ControlExample> |
15 | 26 |
|
16 | 27 | <local:ControlExample x:Name="Example2" HeaderText="A PasswordBox with header, placeholder text and custom character."> |
17 | 28 | <PasswordBox |
18 | 29 | x:Name="passwordBox" |
19 | 30 | Width="300" |
| 31 | + HorizontalAlignment="Left" |
20 | 32 | ui:ControlHelper.Header="Password" |
21 | 33 | ui:ControlHelper.PlaceholderText="Enter your password" |
22 | | - ui:PasswordBoxHelper.PasswordRevealMode="Hidden" |
23 | 34 | PasswordChar="#" /> |
| 35 | + </local:ControlExample> |
24 | 36 |
|
25 | | - <local:ControlExample.Options> |
26 | | - <ikw:SimpleStackPanel Style="{StaticResource OptionsPanelStyle}"> |
27 | | - <ui:RadioButtons |
28 | | - Header="PasswordRevealMode" |
29 | | - ItemsSource="{Binding Source={x:Type ui:PasswordRevealMode}, Converter={StaticResource EnumValuesConverter}}" |
30 | | - SelectedItem="{Binding ElementName=passwordBox, Path=(ui:PasswordBoxHelper.PasswordRevealMode)}" |
31 | | - SelectionChanged="RadioButtons_SelectionChanged"/> |
32 | | - </ikw:SimpleStackPanel> |
33 | | - </local:ControlExample.Options> |
| 37 | + <local:ControlExample x:Name="Example3" HeaderText="A PasswordBox with reveal mode."> |
| 38 | + <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> |
| 39 | + <PasswordBox |
| 40 | + x:Name="passwordBoxWithReveal" |
| 41 | + Width="250" |
| 42 | + Margin="0,0,8,0" |
| 43 | + AutomationProperties.Name="Sample password box" |
| 44 | + ui:PasswordBoxHelper.PasswordRevealMode="Hidden" /> |
| 45 | + <CheckBox |
| 46 | + x:Name="revealModeCheckBox" |
| 47 | + Content="Show password" |
| 48 | + IsChecked="False" |
| 49 | + Checked="RevealModeCheckbox_Changed" |
| 50 | + Unchecked="RevealModeCheckbox_Changed" /> |
| 51 | + </StackPanel> |
34 | 52 | </local:ControlExample> |
35 | 53 | </ikw:SimpleStackPanel> |
36 | 54 | </ui:Page> |
0 commit comments