aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-08 13:35:27 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-08 13:35:27 +0300
commit57ae9d131e898a35061507bc8497bcf648cf00d1 (patch)
tree91e5c55fdcced791f509b24d13c4a73294a295f2 /Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation
parent8dac70e25c92eea8278c564615509386a1a0182d (diff)
downloadTango-57ae9d131e898a35061507bc8497bcf648cf00d1.tar.gz
Tango-57ae9d131e898a35061507bc8497bcf648cf00d1.zip
Working on machine setup !
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
index f06bd88de..a05d5fc5c 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
@@ -108,6 +108,26 @@ namespace Tango.PPC.UI.Navigation
}
/// <summary>
+ /// Navigates to the specified PPC view with the specified receive object.
+ /// </summary>
+ /// <param name="view">The view.</param>
+ /// <param name="obj"></param>
+ /// <param name="pushToHistory"></param>
+ /// <returns></returns>
+ public Task<bool> NavigateWithObject<TPass>(NavigationView view, TPass obj, bool pushToHistory = true)
+ {
+ MainView.Instance.NavigationControl.NavigateTo(view.ToString());
+ INavigationObjectReceiver<TPass> receiver = MainView.Instance.NavigationControl.Elements.FirstOrDefault(x => (x.GetType().Name == view.ToString() || NavigationControl.GetNavigationName(x) == view.ToString()) && x.DataContext is INavigationObjectReceiver<TPass>).DataContext as INavigationObjectReceiver<TPass>;
+
+ if (receiver != null)
+ {
+ receiver.OnNavigatedToWithObject(obj);
+ }
+
+ return Task.FromResult(true);
+ }
+
+ /// <summary>
/// Navigates to the specified module.
/// </summary>
/// <typeparam name="T"></typeparam>