Search Results for

    Show / Hide Table of Contents

    Class RelayCommand

    Relay command using delegate command pattern

    Inheritance
    System.Object
    RelayCommand
    Implements
    System.Windows.Input.ICommand
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Simplic.UI.MVC
    Assembly: Simplic.UI.dll
    Syntax
    public class RelayCommand : ICommand

    Constructors

    | Improve this Doc View Source

    RelayCommand(Action<Object>)

    Initialize new RelayCommand

    Declaration
    public RelayCommand(Action<object> execute)
    Parameters
    Type Name Description
    System.Action<System.Object> execute

    Method to execute

    | Improve this Doc View Source

    RelayCommand(Action<Object>, Predicate<Object>)

    Initialize new RelayCommand

    Declaration
    public RelayCommand(Action<object> execute, Predicate<object> canExecute)
    Parameters
    Type Name Description
    System.Action<System.Object> execute

    Method to execute

    System.Predicate<System.Object> canExecute

    Method to dertermine whether the command can be executed

    Methods

    | Improve this Doc View Source

    CanExecute(Object)

    Execute the can-execute method to dertermine, whether the command can be executed

    Declaration
    public bool CanExecute(object parameter)
    Parameters
    Type Name Description
    System.Object parameter

    Parameter object

    Returns
    Type Description
    System.Boolean

    True if the command can be executed

    | Improve this Doc View Source

    Destroy()

    Remove the command

    Declaration
    public void Destroy()
    | Improve this Doc View Source

    Execute(Object)

    Execute the command and call the execute method

    Declaration
    public void Execute(object parameter)
    Parameters
    Type Name Description
    System.Object parameter

    Parameter which will be passed to the method

    | Improve this Doc View Source

    OnCanExecuteChanged()

    Declaration
    public void OnCanExecuteChanged()

    Events

    | Improve this Doc View Source

    CanExecuteChanged

    Adds or removes an event which will be called if can executed was changed

    Declaration
    public event EventHandler CanExecuteChanged
    Event Type
    Type Description
    System.EventHandler

    Implements

    System.Windows.Input.ICommand
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx