Пример #1
0
 /// <summary>
 /// Creates a new close <see cref="NavigationRequest"/>.
 /// </summary>
 /// <param name="properties">The <see cref="NavigationProperties"/> describing the behavior of the navigation operation.</param>
 public NavigationRequest(NavigationProperties properties)
 {
     ViewModelType  = null;
     Properties     = properties;
     Parameter      = null;
     IsCloseRequest = true;
 }
Пример #2
0
 /// <summary>
 /// Creates a new <see cref="NavigationRequest"/>.
 /// </summary>
 /// <param name="viewModelType">The <see cref="Type"/> of the <see cref="IViewModel"/> being navigated to.</param>
 /// <param name="properties">The <see cref="NavigationProperties"/> describing the behavior of the navigation operation.</param>
 /// <param name="parameter">An <see cref="object"/> parameter being passed to the <see cref="IViewModel.InitializeAsync(object)"/> task when navigation occurs.</param>
 public NavigationRequest(Type viewModelType, NavigationProperties properties, object parameter = null)
 {
     ViewModelType  = viewModelType;
     Properties     = properties;
     Parameter      = parameter;
     IsCloseRequest = false;
 }
Пример #3
0
 /// <summary>
 /// Navigates to a <see cref="IViewModel"/> of type <typeparamref name="T"/>.
 /// </summary>
 /// <param name="navigationService">The <see cref="INavigationService"/> performing the navigation operation.</param>
 /// <typeparam name="T">The type of the <see cref="IViewModel"/> being navigated to.</typeparam>
 /// <param name="navigationMode">The <see cref="NavigationProperties"/> describing the behavior of the navigation operation.</param>
 /// <param name="parameter">An <see cref="object"/> parameter being passed to the <see cref="IViewModel.InitializeAsync(object)"/> task when navigation occurs.</param>
 public static void Navigate <T>(this INavigationService navigationService, NavigationProperties navigationMode, object parameter = null) => navigationService.Navigate(new NavigationRequest(typeof(T), navigationMode, parameter));
Пример #4
0
 /// <summary>
 /// Navigates to a <see cref="IViewModel"/> of the given <see cref="Type"/>.
 /// </summary>
 /// <param name="navigationService">The <see cref="INavigationService"/> performing the navigation operation.</param>
 /// <param name="viewModelType">The <see cref="Type"/> of the <see cref="IViewModel"/> being navigated to.</param>
 /// <param name="navigationMode">The <see cref="NavigationProperties"/> describing the behavior of the navigation operation.</param>
 /// <param name="parameter">An <see cref="object"/> parameter being passed to the <see cref="IViewModel.InitializeAsync(object)"/> task when navigation occurs.</param>
 public static void Navigate(this INavigationService navigationService, Type viewModelType, NavigationProperties navigationMode, object parameter = null) => navigationService.Navigate(new NavigationRequest(viewModelType, navigationMode, parameter));