aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI/Controls
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-11-25 16:39:01 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-11-25 16:39:01 +0200
commit78c93e2ee1eddff67554edec9f956536a0b61482 (patch)
tree208e8f9c368cfa324e255493bb287e50b79b04fa /Software/Visual_Studio/Tango.SharedUI/Controls
parentca18248f6203d7567a2276ec76360aedd4cfda0b (diff)
downloadTango-78c93e2ee1eddff67554edec9f956536a0b61482.tar.gz
Tango-78c93e2ee1eddff67554edec9f956536a0b61482.zip
Working on Backup/Restore...
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Controls')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs27
1 files changed, 18 insertions, 9 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs
index b3869daff..71dc96774 100644
--- a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs
+++ b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@@ -574,17 +575,25 @@ namespace Tango.SharedUI.Controls
var element = Elements.SingleOrDefault(x => GetNavigationName(x) == navigationName || x.GetType().Name == navigationName);
- if (element != null)
+ Task.Factory.StartNew(() =>
{
- if (SelectedElement == element)
- {
- _onCompleted?.Invoke();
- }
- else
+ Thread.Sleep(10);
+
+ Dispatcher.BeginInvoke(new Action(() =>
{
- SelectedElement = element;
- }
- }
+ if (element != null)
+ {
+ if (SelectedElement == element)
+ {
+ _onCompleted?.Invoke();
+ }
+ else
+ {
+ SelectedElement = element;
+ }
+ }
+ }));
+ });
return element;
}