我试图在我的视图模型中创建一个SecureString类型的属性来将它绑定到我的PasswordBox,但是看起来UWP不支持它。我是不是遗漏了什么?
发布于 2016-06-06 17:22:27
System.Security不包含SecureString System.Security namespaces for UWP apps
这个问题已经问过了,请参阅:link
如果您只想加密值,可以使用Windows.Security.Cryptography名称空间,但应用程序的内存空间中仍然可以使用明文(例如,将明文存在于页面文件或崩溃转储中)。
发布于 2016-12-20 19:08:17
您可以使用https://gist.github.com/lindexi/e4809b4b54a36db6aa166524c89fcebb并将其转换为文件。
set the PasswordBox view:PasswordBoxHelper.Attach="True" view:PasswordBoxHelper.Password="{Binding Password,Mode=TwoWay}".The Password是ViewModel中定义的属性。
https://stackoverflow.com/questions/37653641
复制相似问题