diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-23 10:23:17 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-23 10:23:17 +0300 |
| commit | 6a57fbce8bf9931ecfd03c6e91f2fb25be4e7d9f (patch) | |
| tree | 92bc7391888a7673e8838afea83ae74fb1becdd0 /Software/Visual_Studio/Tango.SharedUI | |
| parent | 2c8da378c82e5181f0566a564de529ab7ef96f4f (diff) | |
| download | Tango-6a57fbce8bf9931ecfd03c6e91f2fb25be4e7d9f.tar.gz Tango-6a57fbce8bf9931ecfd03c6e91f2fb25be4e7d9f.zip | |
Implemented new hardware components "Active" on machine operator upload hardware configuration.
Improved and tested global exception trapper on async task.
Fixed a weird issue on navigation control toAnimation complete's twice.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs index c8b6d3afb..d21a562fd 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs +++ b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs @@ -378,21 +378,28 @@ namespace Tango.SharedUI.Controls fromElement.Deactivate(!KeepElementsAttached); }; + bool completed = false; + toAnimation.Completed += (_, __) => { - INavigationView navigationView = toElement.Element as INavigationView; - if (navigationView != null) + if (!completed) { - navigationView.OnNavigated(); - } + completed = true; + + INavigationView navigationView = toElement.Element as INavigationView; + if (navigationView != null) + { + navigationView.OnNavigated(); + } - INavigationViewModel fromVM = fromElement.Element.DataContext as INavigationViewModel; - INavigationViewModel toVM = toElement.Element.DataContext as INavigationViewModel; + INavigationViewModel fromVM = fromElement.Element.DataContext as INavigationViewModel; + INavigationViewModel toVM = toElement.Element.DataContext as INavigationViewModel; - if (fromVM != null && fromVM != toVM) fromVM.OnNavigatedFrom(); - if (toVM != null) toVM.OnNavigatedTo(); + if (fromVM != null && fromVM != toVM) fromVM.OnNavigatedFrom(); + if (toVM != null) toVM.OnNavigatedTo(); - _onCompleted?.Invoke(); + _onCompleted?.Invoke(); + } }; switch (TransitionType) |
