Note that there are some explanatory texts on larger screens.

plurals
  1. POShow Password Char by Customizing Style for PasswordBox in Silverlight for Windows Phone 7
    primarykey
    data
    text
    <p>I want to create my own password box in order to handle background state when password box is focus or lost focus. This is the style for my password box:</p> <pre><code>&lt;Style x:Key="GamePasswordBox" TargetType="PasswordBox"&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="PasswordBox"&gt; &lt;Grid&gt; &lt;vsm:VisualStateManager.VisualStateGroups&gt; &lt;vsm:VisualStateGroup x:Name="CommonStates"&gt; &lt;vsm:VisualState x:Name="GotFocus"&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Duration="0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To=".6"/&gt; &lt;/Storyboard&gt; &lt;/vsm:VisualState&gt; &lt;vsm:VisualState x:Name="LostFocus"&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Duration="0" Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="1"/&gt; &lt;/Storyboard&gt; &lt;/vsm:VisualState&gt; &lt;/vsm:VisualStateGroup&gt; &lt;/vsm:VisualStateManager.VisualStateGroups&gt; &lt;Border x:Name="Background" CornerRadius="0" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"&gt; &lt;Grid Background="{TemplateBinding Background}" Margin="0"&gt; &lt;/Grid&gt; &lt;/Border&gt; &lt;ContentPresenter x:Name="contentPresenter" Content="{TemplateBinding Password}" Margin="{TemplateBinding Padding}" /&gt; &lt;/Grid&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre> <p>The problem is the password box now shows the input chars instead of mask password chars. How to fix this problem?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload