PasswordBox in Windows phone 8.1 has a property called "IsPasswordRevealButtonEnabled " which helps to show password by clicking the check box underneath it.
- <Grid>
- <PasswordBox Background="White"
- BorderBrush="Gray"
- Foreground="Black"
- Header="Password"
- IsPasswordRevealButtonEnabled="True" />
- </Grid>
But we can remove checkbox and place toggle button inside passwordbox which looks much better.
Here is the code for CustomPasswordBox,
- <Grid>
- <PasswordBox Background="White"
- BorderBrush="Gray"
- Foreground="Black"
- Header="Password"
- IsPasswordRevealButtonEnabled="True"
- Style="{StaticResource CustomPasswordBoxStyle}" />
- </Grid>
This is how the CustomPasswordBox looks like
Source code is included, if in case of any doubts feel free to ask.