<ui:Page
    x:Class="ModernWpf.SampleApp.ControlPages.PasswordBoxPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:sc="clr-namespace:SamplesCommon;assembly=SamplesCommon"
    mc:Ignorable="d">

    <ScrollViewer>
        <ui:SimpleStackPanel Style="{StaticResource ControlPageContentPanelStyle}">
            <sc:ControlExample HeaderText="A simple PasswordBox.">
                <PasswordBox Width="300" />
            </sc:ControlExample>

            <sc:ControlExample HeaderText="A PasswordBox with header, placeholder text and custom character.">
                <PasswordBox
                    x:Name="passwordBox"
                    Width="300"
                    ui:ControlHelper.Header="Password"
                    ui:ControlHelper.PlaceholderText="Enter your password"
                    PasswordChar="#" />

                <sc:ControlExample.Options>
                    <ui:SimpleStackPanel Style="{StaticResource OptionsPanelStyle}">
                        <ui:RadioButtons
                            Header="PasswordRevealMode"
                            ItemsSource="{Binding Source={x:Type ui:PasswordRevealMode}, Converter={StaticResource EnumValuesConverter}}"
                            SelectedItem="{Binding ElementName=passwordBox, Path=(ui:PasswordBoxHelper.PasswordRevealMode)}" />
                    </ui:SimpleStackPanel>
                </sc:ControlExample.Options>
            </sc:ControlExample>
        </ui:SimpleStackPanel>
    </ScrollViewer>
</ui:Page>
