Complementing the answer, the webview configured as autofill in Blazor can be easily disabled if the MainPage that dictates the blazor route is defined as:
public partial class MainPage : ContentPage
{
public MainPage()
{
Loaded += MainPage_Loaded;
InitializeComponent();
}
private async void MainPage_Loaded(object? sender, EventArgs e)
{
#if WINDOWS
await (blazorWebView.Handler.PlatformView as Microsoft.UI.Xaml.Controls.WebView2).EnsureCoreWebView2Async();
(blazorWebView.Handler.PlatformView as Microsoft.UI.Xaml.Controls.WebView2).CoreWebView2.Settings.IsGeneralAutofillEnabled = false;
#endif
}
}
The CoreWebView2 component starts asynchronously, so it is necessary to use await and the EnsureCoreWebView2Async() method before manipulating its properties.
Other references: Why my coreWebView2 which is object of webView2 is null?