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);
        }
示例#2
0
        // *** IUICommand Implementations ***

        private static void NavigateToUICommand_Invoked(IUICommand command)
        {
            NavigateToState state = (NavigateToState)command.Id;

            state.NavigationManager.NavigateTo(state.PageName, state.Arguments);
        }
示例#3
0
        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));
        }
示例#4
0
        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);
        }