diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-25 22:40:07 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-25 22:40:07 +0200 |
| commit | b62e186d8f9882eba839cfe66228c0b40228b218 (patch) | |
| tree | f144b40fc78113efd19a67d2d65c168f208ad942 /Software/Visual_Studio/Tango.SharedUI/Controls | |
| parent | 2d348601b909806cd6c2c7ef5544bec24db3208d (diff) | |
| download | Tango-b62e186d8f9882eba839cfe66228c0b40228b218.tar.gz Tango-b62e186d8f9882eba839cfe66228c0b40228b218.zip | |
FSE: better navigation handling for main views.
Added support for OnBefore/After navigation + Blocking.
Added Async NavigateTo for NavigationControl.
Added auto forget credentials on logout.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Controls')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs index 0ef8d0ecc..15d15decb 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs +++ b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs @@ -690,6 +690,20 @@ namespace Tango.SharedUI.Controls return element; } + public Task<FrameworkElement> NavigateToAsync(String navigationName) + { + TaskCompletionSource<FrameworkElement> source = new TaskCompletionSource<FrameworkElement>(); + + FrameworkElement view = null; + + view = NavigateTo(navigationName, () => + { + source.SetResult(view); + }); + + return source.Task; + } + public FrameworkElement GetElement(String navigationName) { return Elements.SingleOrDefault(x => GetNavigationName(x) == navigationName || x.GetType().Name == navigationName); |
