简体   繁体   English

WebView2:如何启用密码自动填充?

[英]WebView2: How to enable Password Autofill?

How can I change the "IsPasswordAutofillEnabled" Property to be "TRUE" on WebView2?如何在 WebView2 上将“IsPasswordAutofillEnabled”属性更改为“TRUE”?

I've read the Microsoft page countless of times but can't actually figure out how to do it in Visual Studio.我已经无数次阅读Microsoft 页面,但实际上无法弄清楚如何在 Visual Studio 中进行操作。

This feature is an experimental feature of Microsoft.Web.WebView2 package 1.0.865-prerelease and only exists in this version.此功能是Microsoft.Web.WebView2 package 1.0.865-prerelease的实验性功能,仅存在于此版本中。

If you want to use it, just add the following package references in the package reference interface:如果您想使用它,只需在 package 参考接口中添加以下 package 参考:

<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.865-prerelease" />

在此处输入图像描述

Modify the attribute like this:像这样修改属性:

webView.CoreWebView2.Settings.IsPasswordAutofillEnabled = true;(webView is the control's name)

Here is the introduction document of webview2.这里是webview2的介绍文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM