From ffed047fa3fab5428ad14c95fd55ec28728a94f3 Mon Sep 17 00:00:00 2001 From: ziti-ci Date: Fri, 18 Dec 2020 13:54:26 -0500 Subject: [PATCH] wrapping other functions in the dispatcher to ensure they are done on the UI thread --- DesktopEdge/MainWindow.xaml.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DesktopEdge/MainWindow.xaml.cs b/DesktopEdge/MainWindow.xaml.cs index d1ccb9b0..ee145be3 100644 --- a/DesktopEdge/MainWindow.xaml.cs +++ b/DesktopEdge/MainWindow.xaml.cs @@ -879,9 +879,11 @@ namespace ZitiDesktopEdge { } public void ShowError(String title, String message) { - ErrorTitle.Content = title; - ErrorDetails.Text = message; - ErrorView.Visibility = Visibility.Visible; + this.Dispatcher.Invoke(() => { + ErrorTitle.Content = title; + ErrorDetails.Text = message; + ErrorView.Visibility = Visibility.Visible; + }); } private void CloseError(object sender, RoutedEventArgs e) {