WebView2.OnPreviewKeyDown(KeyEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This is the "Preview" (i.e. tunneling) version of OnKeyDown(KeyEventArgs), so it actually happens first. Like OnKeyDown, this will only ever be called if we're explicitly forwarding key presses from the CoreWebView2. In order to mimic WPF's standard input handling, when we receive this we turn around and fire off the standard bubbling KeyDownEvent. That way others in the WPF tree see the same standard pair of input events that WPF itself would have triggered if it were handling the key press.
protected override void OnPreviewKeyDown (System.Windows.Input.KeyEventArgs e);
override this.OnPreviewKeyDown : System.Windows.Input.KeyEventArgs -> unit
Protected Overrides Sub OnPreviewKeyDown (e As KeyEventArgs)