Class CommandBehaviorBase<T>
Base behavior to handle connecting a System.Windows.Controls.Control to a Command.
Inheritance
System.Object
CommandBehaviorBase<T>
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Presentation.Behaviors
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class CommandBehaviorBase<T>
where T : Control
Type Parameters
Name | Description |
---|---|
T | The target object must derive from Control |
Constructors
View SourceCommandBehaviorBase(T)
Constructor specifying the target object.
Declaration
public CommandBehaviorBase(T targetObject)
Parameters
Type | Name | Description |
---|---|---|
T | targetObject | The target object the behavior is attached to. |
Properties
View SourceCommand
Corresponding command to be execute and monitored for System.Windows.Input.ICommand.CanExecuteChanged
Declaration
public ICommand Command { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Input.ICommand |
CommandParameter
The parameter to supply the command during execution
Declaration
public object CommandParameter { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
TargetObject
Object to which this behavior is attached.
Declaration
protected T TargetObject { get; }
Property Value
Type | Description |
---|---|
T |
Methods
View SourceExecuteCommand()
Executes the command, if it's set, providing the CommandParameter
Declaration
protected virtual void ExecuteCommand()
UpdateEnabledState()
Updates the target object's IsEnabled property based on the commands ability to execute.
Declaration
protected virtual void UpdateEnabledState()