![]() In windowed mode, the event handler is run synchronously. Filter out the auto-repeated key events by verifying the KeyEventLParam or PhysicalKeyStatus event args. The Escape key is always considered an accelerator.Īuto-repeated key events caused by holding the key down also triggers this event. The pressed key does not map to a character.Ī few specific keys are never considered accelerators, such as Shift. A key is considered an accelerator if either of the following conditions are true. Public HRESULT add_AcceleratorKeyPressed( ICoreWebView2AcceleratorKeyPressedEventHandler * eventHandler, EventRegistrationToken * token)ĪcceleratorKeyPressed runs when an accelerator key or key combo is pressed or released while the WebView is focused. The CoreWebView2Controller owns the CoreWebView2, and if all references to the CoreWebView2Controller go away, the WebView is closed. Updates Bounds and ZoomFactor properties at the same time. Remove an event handler previously added with add_ZoomFactorChanged. Removes an event handler previously added with add_MoveFocusRequested. Removes an event handler previously added with add_LostFocus. Removes an event handler previously added with add_GotFocus. Removes an event handler previously added with add_AcceleratorKeyPressed. ![]() This is a notification separate from Bounds that tells WebView that the main WebView parent (or any ancestor) HWND moved. ![]() The parent window provided by the app that this WebView is using to render content. The IsVisible property determines whether to show or hide the WebView2. Gets the CoreWebView2 associated with this CoreWebView2Controller. Summary MembersĪdds an event handler for the AcceleratorKeyPressed event.Īdds an event handler for the GotFocus event.Īdds an event handler for the LostFocus event.Īdds an event handler for the MoveFocusRequested event.Īdds an event handler for the ZoomFactorChanged event.Ĭloses the WebView and cleans up the underlying browser instance. The owner of the CoreWebView2 object that provides support for resizing, showing and hiding, focusing, and other functionality related to windowing and composition. In this article interface ICoreWebView2Controller
0 Comments
Leave a Reply. |