pub trait ICoreWebView2Settings5: ICoreWebView2Settings4 {
// Required methods
unsafe fn get_is_pinch_zoom_enabled(&self, enabled: *mut BOOL) -> HRESULT;
unsafe fn put_is_pinch_zoom_enabled(&self, enabled: BOOL) -> HRESULT;
}Expand description
A continuation of the ICoreWebView2Settings interface to manage pinch zoom.
Required Methods§
Sourceunsafe fn get_is_pinch_zoom_enabled(&self, enabled: *mut BOOL) -> HRESULT
unsafe fn get_is_pinch_zoom_enabled(&self, enabled: *mut BOOL) -> HRESULT
Pinch-zoom, referred to as “Page Scale” zoom, is performed as a post-rendering step, it changes the page scale factor property and scales the surface the web page is rendered onto when user performs a pinch zooming action. It does not change the layout but rather changes the viewport and clips the web content, the content outside of the viewport isn’t visible onscreen and users can’t reach this content using mouse.
The IsPinchZoomEnabled property enables or disables the ability of
the end user to use a pinching motion on touch input enabled devices
to scale the web content in the WebView2. It defaults to TRUE.
When set to FALSE, the end user cannot pinch zoom after the next navigation.
Disabling/Enabling IsPinchZoomEnabled only affects the end user’s ability to use
pinch motions and does not change the page scale factor.
This API only affects the Page Scale zoom and has no effect on the
existing browser zoom properties (IsZoomControlEnabled and ZoomFactor)
or other end user mechanisms for zooming.
\snippet SettingsComponent.cpp TogglePinchZoomEnabled
Sourceunsafe fn put_is_pinch_zoom_enabled(&self, enabled: BOOL) -> HRESULT
unsafe fn put_is_pinch_zoom_enabled(&self, enabled: BOOL) -> HRESULT
Set the IsPinchZoomEnabled property