How to disable the WebView2 status bar in a WPF app


Issue

Here are the steps you'll need to disable the statusbar (which shows hover links) if you're using a WebView2 control in a WPF app (some variation of this would work from WinForms as well).

The key is that the IsStatusBarEnabled property currently needs to be set via code and also needs to be set after the WebView2 has initialized. The IsStatusBarEnabled is currently accessible through code but not via markup in the XAML.

XAML

<wpf:WebView2 Name="EdgeWebView"                  
    CoreWebView2InitializationCompleted="EdgeWebView_CoreWebView2InitializationCompleted" />

C#

private void EdgeWebView_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
{
    EdgeWebView.CoreWebView2.Settings.IsStatusBarEnabled = false;
}