0
我正在开发一个Windows应用商店并在其中使用PasswordBox。当我在空框中输入符号时 - 显示按钮“显示密码”。但是当我编辑值或将符号复制到密码箱中时 - 没有按钮。 的XAML:WinRt PasswordBox显示按钮“显示密码”
<ScrollViewer Margin="10,15,20,15">
<Grid Margin="35,35,150,35" Visibility="Collapsed">
<Grid.RowDefinitions>
...
<RowDefinition Height="Auto"/>
...
</Grid.RowDefinitions>
...
<PasswordBox x:Name="pxPass" IsPasswordRevealButtonEnabled ="True" Grid.Row="6"/>
...
</Grid>
代码:
private void btnTapped(object sender, TappedRoutedEventArgs e)
{
pxPass.Focus(FocusState.Programmatic);
pxPass.Password = 'string';
}`
我能在这做这种情况?
谢谢!所有观察到的因素,但是当我编辑文本到密码箱 - 按钮仍然不可见。 – 2015-02-09 20:37:32
@DariaKorosteleva这很奇怪,我现在正在测试它,它对我来说非常整洁,你确定你没有设置或做别的事情,我们应该知道吗?你能分享你的完整代码吗? – AymenDaoudi 2015-02-09 23:16:15
我在主要问题中共享完整的代码,我使用密码箱。谢谢! – 2015-02-10 21:05:26