Show / Hide Table of Contents

Class CommandBehaviorBase<T>

Base behavior to handle connecting a System.Windows.Controls.Control to a Command.

Inheritance
System.Object
CommandBehaviorBase<T>
SelectorCommandBehavior
TextBoxClickCommandBehavior
TextChangedCommandBehavior
TreeViewBehavior
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 Source

CommandBehaviorBase(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 Source

Command

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
View Source

CommandParameter

The parameter to supply the command during execution

Declaration
public object CommandParameter { get; set; }
Property Value
Type Description
System.Object
View Source

TargetObject

Object to which this behavior is attached.

Declaration
protected T TargetObject { get; }
Property Value
Type Description
T

Methods

View Source

ExecuteCommand()

Executes the command, if it's set, providing the CommandParameter

Declaration
protected virtual void ExecuteCommand()
View Source

UpdateEnabledState()

Updates the target object's IsEnabled property based on the commands ability to execute.

Declaration
protected virtual void UpdateEnabledState()

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX