diff --git a/src/DocumentationBrowserViewExtension/DocumentationBrowserView.xaml.cs b/src/DocumentationBrowserViewExtension/DocumentationBrowserView.xaml.cs index 37d898ad927..2a9bffbaff3 100644 --- a/src/DocumentationBrowserViewExtension/DocumentationBrowserView.xaml.cs +++ b/src/DocumentationBrowserViewExtension/DocumentationBrowserView.xaml.cs @@ -142,6 +142,8 @@ async void InitializeAsync() })); this.documentationBrowser.CoreWebView2.WebMessageReceived += CoreWebView2OnWebMessageReceived; + this.documentationBrowser.CoreWebView2.Settings.IsZoomControlEnabled = true; + this.documentationBrowser.CoreWebView2.Settings.AreDevToolsEnabled = true; } private void CoreWebView2OnWebMessageReceived(object sender, CoreWebView2WebMessageReceivedEventArgs e) diff --git a/src/DynamoCoreWpf/Utilities/ResourceUtilities.cs b/src/DynamoCoreWpf/Utilities/ResourceUtilities.cs index 5bc231227bb..8cbf3ed5a66 100644 --- a/src/DynamoCoreWpf/Utilities/ResourceUtilities.cs +++ b/src/DynamoCoreWpf/Utilities/ResourceUtilities.cs @@ -539,6 +539,9 @@ internal static async Task ExecuteJSFunction(UIElement MainWindow, HostC // Context menu disabled webBrowserComponent.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false; webBrowserComponent.NavigateToString(bodyHtmlPage); + + webBrowserComponent.CoreWebView2.Settings.IsZoomControlEnabled = false; + webBrowserComponent.CoreWebView2.Settings.IsPinchZoomEnabled = false; } catch (Exception ex) { diff --git a/src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs b/src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs index 987dc2431eb..584cd836cb4 100644 --- a/src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs +++ b/src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs @@ -257,6 +257,9 @@ protected override async void OnContentRendered(EventArgs e) await webView.EnsureCoreWebView2Async(); // Context menu disabled webView.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false; + // Zoom control disabled + webView.CoreWebView2.Settings.IsZoomControlEnabled = false; + var assembly = Assembly.GetExecutingAssembly(); using (Stream stream = assembly.GetManifestResourceStream(htmlEmbeddedFile)) diff --git a/src/LibraryViewExtensionWebView2/LibraryViewController.cs b/src/LibraryViewExtensionWebView2/LibraryViewController.cs index 91e239f60b1..ecd496a69fe 100644 --- a/src/LibraryViewExtensionWebView2/LibraryViewController.cs +++ b/src/LibraryViewExtensionWebView2/LibraryViewController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -266,6 +266,7 @@ async void InitializeAsync() twoWayScriptingObject = new ScriptingObject(this); //register the interop object into the browser. this.browser.CoreWebView2.AddHostObjectToScript("bridgeTwoWay", twoWayScriptingObject); + browser.CoreWebView2.Settings.IsZoomControlEnabled = true; } private void CoreWebView2_WebMessageReceived(object sender, CoreWebView2WebMessageReceivedEventArgs args) diff --git a/src/Notifications/NotificationCenterController.cs b/src/Notifications/NotificationCenterController.cs index cf9014f3bc3..6987c212813 100644 --- a/src/Notifications/NotificationCenterController.cs +++ b/src/Notifications/NotificationCenterController.cs @@ -230,6 +230,8 @@ private void WebView_CoreWebView2InitializationCompleted(object sender, Microsof // Hosts an object that will expose the properties and methods to be called from the javascript side notificationUIPopup.webView.CoreWebView2.AddHostObjectToScript("scriptObject", new ScriptObject(OnMarkAllAsRead)); + + notificationUIPopup.webView.CoreWebView2.Settings.IsZoomControlEnabled = false; } }