Пример #1
0
 /// <summary>
 /// Navigate to specified page
 /// </summary>
 public void GoTo(
     Type page,
     PageViewmodelBase <TAppViewModel> viewModel,
     RelayCommand command = null,
     bool allowReentry    = false)
 {
     NavigateTo?.Invoke(page, viewModel, command, allowReentry);
 }
Пример #2
0
 /// <summary>
 /// Specify page you want to navigate to, and associated fields,
 /// such as menu, title, etc.
 /// </summary>
 /// <param name="viewModel">Page's viewmodel. You may set viewModel using BeforeNavigatingCommand</param>
 /// <param name="page">Navigation page</param>
 public MenuItem(
     PageViewmodelBase <TAppViewModel> viewModel,
     Type page,
     RelayCommand afterNavigatingCommand   = null,
     RelayCommand beforerNavigatingCommand = null,
     string menuTitle = null,
     string menuIcon  = null,
     bool reentry     = false)
 {
     MenuTitle               = menuTitle == null ? viewModel?.PageTitle : menuTitle;
     MenuIcon                = menuIcon == null ? viewModel?.IconCode : menuIcon;
     Page                    = page;
     ViewModel               = viewModel;
     UseBackButton           = false;
     IsCommand               = false;
     BeforeNavigatingCommand = beforerNavigatingCommand;
     AfterNavigatingCommand  = afterNavigatingCommand;
     Command                 = afterNavigatingCommand;
     Reentry                 = reentry;
 }