public static void RegisterAll <TView>()
        {
            var views = Enum.GetValues(typeof(TView)).Cast <TView>();

            foreach (TView view in views)
            {
                MemberInfo        viewInfo = typeof(TView).GetMember(view.ToString()).FirstOrDefault();
                ViewTypeAttribute viewType = viewInfo.GetCustomAttributes <ViewTypeAttribute>().FirstOrDefault();
                if (viewType != null)
                {
                    NavigationServiceHelper <TView> .RegisterView(view, viewType.ViewType);
                }
            }
        }
Exemple #2
0
        public static void RegisterAll <TView>()
        {
            var views = Enum.GetValues(typeof(TView)).Cast <TView>();

            foreach (TView view in views)
            {
                MemberInfo           viewInfo    = typeof(TView).GetMember(view.ToString()).FirstOrDefault();
                DescriptionAttribute description = (DescriptionAttribute)viewInfo.GetCustomAttributes(typeof(DescriptionAttribute)).FirstOrDefault();

                if (description != null)
                {
                    NavigationServiceHelper <TView> .RegisterView(view, description.Description);
                }
            }
        }
Exemple #3
0
 public static void Navigate(this NavigationService navigationService, String pageUri)
 {
     NavigationServiceHelper.Navigate(pageUri);
 }
Exemple #4
0
 /// <summary>
 /// Simple helper method that allows us to navigate to a page using a strongly typed
 /// page reference without needing to explicitly specify the type twice.
 /// </summary>
 /// <typeparam name="TView">The type of the view to navigate to</typeparam>
 /// <param name="view">The view to navigate to</param>
 public static void Navigate <TView>(TView view)
 {
     NavigationServiceHelper <TView> .Navigate(view);
 }
 /// <summary>
 /// Simple helper method that allows us to navigate to a page using a strongly typed
 /// page reference without needing to explicitly specify the type twice.
 /// </summary>
 /// <typeparam name="TView">The type of the view to navigate to</typeparam>
 /// <param name="view">The view to navigate to</param>
 public static void Navigate <TView>(TView view, object parameter = null)
 {
     NavigationServiceHelper <TView> .Navigate(view, parameter);
 }