WebView2: Forwarding Alt Keys to a Host WPF Window

added by DotNetKicks
4/16/2021 4:50:04 PM

607 Views

I've been puzzling over how to reliably integrate keyboard forwarding from the WebView2 control into WPF host forms. Unlike the IE WebBrowser control the WebView2 doesn't automatically forward Alt keys to the host form so special handling is required. In this post I describe why this is a problem and show the workaround to make this work.


0 comments