Skip to content

Commit 3bca632

Browse files
authored
Update PasswordBoxPage.xaml to more In line with WinUI3 gallery
1 parent 13fde58 commit 3bca632

File tree

1 file changed

+30
-12
lines changed

1 file changed

+30
-12
lines changed
Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ui:Page
1+
<ui:Page
22
x:Class="iNKORE.UI.WPF.Modern.Gallery.Pages.Controls.Windows.PasswordBoxPage"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -10,27 +10,45 @@
1010
mc:Ignorable="d" Loaded="Page_Loaded">
1111
<ikw:SimpleStackPanel>
1212
<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>
1425
</local:ControlExample>
1526

1627
<local:ControlExample x:Name="Example2" HeaderText="A PasswordBox with header, placeholder text and custom character.">
1728
<PasswordBox
1829
x:Name="passwordBox"
1930
Width="300"
31+
HorizontalAlignment="Left"
2032
ui:ControlHelper.Header="Password"
2133
ui:ControlHelper.PlaceholderText="Enter your password"
22-
ui:PasswordBoxHelper.PasswordRevealMode="Hidden"
2334
PasswordChar="#" />
35+
</local:ControlExample>
2436

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>
3452
</local:ControlExample>
3553
</ikw:SimpleStackPanel>
3654
</ui:Page>

0 commit comments

Comments
 (0)