コード例 #1
0
 public static void NavigateTo(this NavigationController controller, ApplicationPages page)
 {
     var kernel = Initializer.GetKernel();
     var module = (Module)kernel.GetModules().Select(modul => modul).Single(modul => modul.GetType() == typeof(Module));
     CurrentPage = module.Pages
         .Select(p => p).Single(p => (ApplicationPages)p.ApplicationPage == page);
     var currentRoot = (PhoneApplicationFrame)Initializer.GetApp().RootVisual;
     controller.NavigateTo(String.Format("{0}{1}",ViewsAssembly,CurrentPage.Uri), currentRoot, SetViewModel);
 }
コード例 #2
0
        public static void NavigateTo(this NavigationController controller, ApplicationPages page)
        {
            var kernel = Initializer.GetKernel();
            var module = (Module)kernel.GetModules().Select(modul => modul).Single(modul => modul.GetType() == typeof(Module));

            CurrentPage = module.Pages
                          .Select(p => p).Single(p => (ApplicationPages)p.ApplicationPage == page);
            var currentRoot = (PhoneApplicationFrame)Initializer.GetApp().RootVisual;

            controller.NavigateTo(String.Format("{0}{1}", ViewsAssembly, CurrentPage.Uri), currentRoot, SetViewModel);
        }