c# - 如何从 UWP 应用中的密码框中删除密码帮助

标签 c# uwp passwordbox

我在 UWP 应用中使用密码框控件。默认情况下,它会显示一个眼睛图标,用户可以通过该图标看到密码以了解他输入的密码是否正确。

enter image description here

这是我当前的代码:

<Page
    x:Class="UwpApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:UwpApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <PasswordBox HorizontalAlignment="Left" VerticalAlignment="Top"   />

    </Grid>
</Page>

虽然我的应用程序面向 Windows 10,但我想根据我的应用程序要求删除此显示功能的密码

有趣的是,passwordbox control available for WPF applications 中没有显示此功能的密码。 ?

最佳答案

您可以在PasswordBox中添加PasswordRevealMode="Hidden"

PasswordBox

关于c# - 如何从 UWP 应用中的密码框中删除密码帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49749380/

相关文章:

mvvm - UWP 属性在用户控件的依赖属性中更改

javascript - 如何将工具栏中的按钮设置为禁用

c# - Entity Framework 在哪里存储属性名称和它在 SQL 中选择的列之间的映射?

c# - 如何使用 LINQ 将字典的键和值组合到一个列表中?

c# - SQL to LINQ with Case .. When in Order By

silverlight - 如何在silverlight中获取<PasswordBox的值?

wpf - 如何在DataGrid中定义PasswordBox类型列?

c# - 使用 Automapper 映射后嵌套对象成员为 null

c# - Win2D CanvasBitmap 与 Microsoft.UI.Composition CompositionImage

c# - 在 SQL Server 中存储、检索和验证密码 (SecureString)