public WpfRelayUICommand(IRelayUICommandInfo info, Action execute, Func <bool> canExecute, bool keepTargetAlive = false) : base(execute, canExecute, keepTargetAlive) { Text = info.Text; Icon = (WpfImage)info.Icon; Shortcut = (WpfShortcut)info.Shortcut; }
/// <summary> /// Creates a new <see cref="IRelayUICommand"/> with the specified info and functions. /// </summary> /// /// <typeparam name="T">The parameter type of the command.</typeparam> /// <param name="info">The abstract information about the command.</param> /// <param name="execute">The execution action.</param> /// <param name="canExecute">The optional can execute function.</param> /// <returns>The constructed <see cref="IRelayUICommand"/></returns> IRelayUICommand CreateCommand <T>(IRelayUICommandInfo info, Action <T> execute, Func <T, bool> canExecute = null, bool keepTargetAlive = false);
/// <summary> /// Creates a new <see cref="IRelayUICommand"/> with the specified info and actions. /// </summary> /// /// <typeparam name="T">The parameter type of the command.</typeparam> /// <param name="info">The abstract information about the command.</param> /// <param name="execute">The execution action.</param> /// <param name="canExecute">The optional can execute function.</param> /// <returns>The constructed <see cref="IRelayUICommand"/></returns> public abstract IRelayUICommand Create <T>(IRelayUICommandInfo info, Action <T> execute, Func <T, bool> canExecute = null);
/// <summary> /// Creates a new <see cref="IRelayUICommand"/> with the specified info and actions. /// </summary> /// /// <param name="info">The abstract information about the command.</param> /// <param name="execute">The execution action.</param> /// <param name="canExecute">The optional can execute function.</param> /// <returns>The constructed <see cref="IRelayUICommand"/></returns> public abstract IRelayUICommand Create(IRelayUICommandInfo info, Action execute, Func <bool> canExecute = null);
public WpfRelayUICommand(IRelayUICommandInfo info, Action execute, bool keepTargetAlive = false) : this(info, execute, null, keepTargetAlive) { }