public void AddState <TView>(TState state, params TState[] permittedAncestors)
            where TView : Control
        {
            _flows.Add(
                state,
                new NavigationFlow <TState>(
                    state,
                    () => _navigationController.Navigate <TView>(),
                    permittedAncestors));

            BaseViewModelExtensions.CreateGlobalCommand(
                typeof(TState).Name + "_" + state.ToString(),
                async ct => _navigationController.Navigate <TView>(),
                // TODO: Observe navigation stack.
                Observable.Return(true));
        }
 /// <summary>
 /// Navigates the active <see cref="Frame"/> to a new instance of the specified <typeparamref name="TView"/>,
 /// providing parameters that can received by the registered view-model.
 /// </summary>
 /// <typeparam name="TView"></typeparam>
 /// <param name="controller"></param>
 /// <param name="arguments"></param>
 public static void Navigate <TView>(this INavigationController controller, object arguments)
     where TView : Control
 {
     controller.Navigate(typeof(TView), arguments);
 }
Example #3
0
 protected override void OnInitialNavigation(LaunchActivatedEventArgs args, INavigationController navigation)
 {
     navigation.Navigate(typeof(MainPage));
 }
 /// <summary>
 /// Navigates the active <see cref="Frame"/> to a new instance of the specified <typeparamref name="TView"/>.
 /// </summary>
 /// <typeparam name="TView"></typeparam>
 /// <param name="controller"></param>
 public static void Navigate <TView>(this INavigationController controller)
     where TView : Control
 {
     controller.Navigate(typeof(TView));
 }