From 1edcb0726caa298bb7237a0706f7cefb2e91f4c4 Mon Sep 17 00:00:00 2001 From: oguzhankoral Date: Fri, 6 Sep 2024 12:46:14 +0300 Subject: [PATCH] Use Invoke function instead InvokeAsync --- DUI3/Speckle.Connectors.DUI.WebView/DUI3ControlWebView.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DUI3/Speckle.Connectors.DUI.WebView/DUI3ControlWebView.xaml.cs b/DUI3/Speckle.Connectors.DUI.WebView/DUI3ControlWebView.xaml.cs index 3aaf220bf..45ed0bf6a 100644 --- a/DUI3/Speckle.Connectors.DUI.WebView/DUI3ControlWebView.xaml.cs +++ b/DUI3/Speckle.Connectors.DUI.WebView/DUI3ControlWebView.xaml.cs @@ -33,7 +33,7 @@ public void ExecuteScriptAsyncMethod(string script) throw new InvalidOperationException("Failed to execute script, Webview2 is not initialized yet."); } - Browser.Dispatcher.InvokeAsync(() => Browser.ExecuteScriptAsync(script), DispatcherPriority.Background); + Browser.Dispatcher.Invoke(() => Browser.ExecuteScriptAsync(script), DispatcherPriority.Background); } private void OnInitialized(object? sender, CoreWebView2InitializationCompletedEventArgs e)