Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.
Note
This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.
interface ICoreWebView2ExperimentalSettings5
: public IUnknown
This is an extension of the ICoreWebView2Settings Experimental interface for IsSwipeNavigationEnabled.
Summary
| Members | Descriptions |
|---|---|
| get_IsSwipeNavigationEnabled | The IsSwipeNavigationEnabled property enables or disables the ability of the end user to use swiping gesture on touch input enabled devices to navigate in WebView2. |
| put_IsSwipeNavigationEnabled | Set the IsSwipeNavigationEnabled property. |
Applies to
| Product | Introduced |
|---|---|
| WebView2 Win32 | N/A |
| WebView2 Win32 Prerelease | 1.0.902 |
Members
get_IsSwipeNavigationEnabled
The IsSwipeNavigationEnabled property enables or disables the ability of the end user to use swiping gesture on touch input enabled devices to navigate in WebView2.
public HRESULT get_IsSwipeNavigationEnabled(BOOL * enabled)
Swiping gesture navigation on touch screen includes:
Swipe left/right (swipe horizontally) to navigate to previous/next page in navigation history.
Pull to refresh (swipe vertically) the current page. (This feature is currently disabled by default in the browser, to enable in WebView2, use
put_AdditionalBrowserArgumentsapi with "--pull-to-refresh" switch). It defaults toTRUE. When set toFALSE, the end user cannot swipe to navigate or pull to refresh. This API only affects the overscrolling navigation functionality and has no effect on the scrolling interaction used to explore the web content shown in WebView2.
CHECK_FEATURE_RETURN(m_experimentalSettings5);
BOOL swipeNavigationEnabled;
CHECK_FAILURE(
m_experimentalSettings5->get_IsSwipeNavigationEnabled(&swipeNavigationEnabled));
if (swipeNavigationEnabled)
{
CHECK_FAILURE(m_experimentalSettings5->put_IsSwipeNavigationEnabled(FALSE));
MessageBox(
nullptr, L"Swipe to navigate is enabled after the next navigation.",
L"Settings change", MB_OK);
}
put_IsSwipeNavigationEnabled
Set the IsSwipeNavigationEnabled property.
public HRESULT put_IsSwipeNavigationEnabled(BOOL enabled)