/// <summary> /// Initializes a new instance of the <see cref="ImpromptuRelayCommand"/> class. /// </summary> /// <param name="executeTarget">The execute target.</param> /// <param name="executeName">Name of the execute.</param> /// <param name="setup">The setup which has the on error event</param> public ImpromptuRelayCommand(object executeTarget, String_OR_InvokeMemberName executeName, ISetupViewModel setup =null) { _executeTarget = executeTarget; _setup = setup; _executeInvoke = new CacheableInvocation(InvocationKind.InvokeMemberAction, executeName,1); _executeInvokeNoArg = new CacheableInvocation(InvocationKind.InvokeMemberAction, executeName, 0); }
/// <summary> /// Initializes a new instance of the <see cref="ImpromptuRelayCommand"/> class. /// </summary> /// <param name="executeTarget">The execute target.</param> /// <param name="executeName">Name of the execute.</param> /// <param name="setup">The setup which has the on error event</param> public ImpromptuRelayCommand(object executeTarget, String_OR_InvokeMemberName executeName, ISetupViewModel setup = null) { _executeTarget = executeTarget; _setup = setup; _executeInvoke = new CacheableInvocation(InvocationKind.InvokeMemberAction, executeName, 1); _executeInvokeNoArg = new CacheableInvocation(InvocationKind.InvokeMemberAction, executeName, 0); }
/// <summary> /// Initializes a new instance of the <see cref="ImpromptuRelayCommand"/> class. /// </summary> /// <param name="executeTarget">The execute target.</param> /// <param name="executeName">Name of the execute method.</param> /// <param name="canExecuteTarget">The can execute target.</param> /// <param name="canExecuteName">Name of the can execute method.</param> public ImpromptuRelayCommand(object executeTarget, String_OR_InvokeMemberName executeName, object canExecuteTarget, String_OR_InvokeMemberName canExecuteName, ISetupViewModel setup = null) :this(executeTarget, executeName, setup) { _canExecuteTarget = canExecuteTarget; _canExecuteInvoke = new CacheableInvocation(InvocationKind.InvokeMember, canExecuteName ,1); _canExecuteInvokeGet = new CacheableInvocation(InvocationKind.Get,canExecuteName); _canExecuteInvokeNoArg = new CacheableInvocation(InvocationKind.InvokeMember, canExecuteName); }
public SetupPage() { InitializeComponent(); SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested; if (ViewHelper.IsIot) { GoBack = new RelayCommand(NavigateBack); } SaveAsDefault = new RelayCommand(async() => await ExecuteSaveAsDefault()); _viewModel = new SetupViewModel(this); DataContext = _viewModel; }
internal ImpromptuCommandBinder(object viewModel, ISetupViewModel setup = null) { _parent = viewModel; _setup = setup; }
/// <summary> /// Initializes a new instance of the <see cref="ImpromptuRelayCommand"/> class. /// </summary> /// <param name="executeTarget">The execute target.</param> /// <param name="executeName">Name of the execute method.</param> /// <param name="canExecuteTarget">The can execute target.</param> /// <param name="canExecuteName">Name of the can execute method.</param> public ImpromptuRelayCommand(object executeTarget, String_OR_InvokeMemberName executeName, object canExecuteTarget, String_OR_InvokeMemberName canExecuteName, ISetupViewModel setup = null) : this(executeTarget, executeName, setup) { _canExecuteTarget = canExecuteTarget; _canExecuteInvoke = new CacheableInvocation(InvocationKind.InvokeMember, canExecuteName, 1); _canExecuteInvokeGet = new CacheableInvocation(InvocationKind.Get, canExecuteName); _canExecuteInvokeNoArg = new CacheableInvocation(InvocationKind.InvokeMember, canExecuteName); }