public static SettingsCommand GetNavigateToSettingsCommand(this INavigationBase navigationBase, string label, string pageName, object arguments = null) { // Validate Parameters if (navigationBase == null) throw new ArgumentNullException(nameof(navigationBase)); if (string.IsNullOrEmpty(label)) throw new ArgumentException(ResourceHelper.GetErrorResource("Exception_ArgumentException_StringIsNullOrEmpty"), nameof(label)); if (string.IsNullOrEmpty(pageName)) throw new ArgumentException(ResourceHelper.GetErrorResource("Exception_ArgumentException_StringIsNullOrEmpty"), nameof(pageName)); // Return the command NavigateToState state = new NavigateToState(navigationBase, pageName, arguments); return new SettingsCommand(state, label, NavigateToUICommand_Invoked); }
// *** IUICommand Implementations *** private static void NavigateToUICommand_Invoked(IUICommand command) { NavigateToState state = (NavigateToState)command.Id; state.NavigationManager.NavigateTo(state.PageName, state.Arguments); }
public static SettingsCommand GetNavigateToSettingsCommand(this INavigationBase navigationManager, string label, string pageName, object arguments = null) { NavigateToState state = new NavigateToState(navigationManager, pageName, arguments); return(new SettingsCommand(state, label, NavigateToUICommand_Invoked)); }
public static SettingsCommand GetNavigateToSettingsCommand(this INavigationBase navigationManager, string label, string pageName, object arguments = null) { NavigateToState state = new NavigateToState(navigationManager, pageName, arguments); return new SettingsCommand(state, label, NavigateToUICommand_Invoked); }