aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs25
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)