Class EventTriggerBehavior
A behavior that listens for a specified event on its source and executes its actions when that event is fired.
Implements
Inherited Members
Namespace: EmptyKeys.UserInterface.Interactions.Core
Assembly: EmptyKeys.UserInterface.dll
Syntax
public sealed class EventTriggerBehavior : DependencyObject, IBehavior
Constructors
EventTriggerBehavior()
Initializes a new instance of the EventTriggerBehavior class.
Declaration
public EventTriggerBehavior()
Fields
ActionsProperty
Identifies the Actions dependency property.
Declaration
public static readonly DependencyProperty ActionsProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
EventNameProperty
Identifies the EventName dependency property.
Declaration
public static readonly DependencyProperty EventNameProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SourceObjectProperty
Identifies the SourceObject dependency property.
Declaration
public static readonly DependencyProperty SourceObjectProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
Actions
Gets the collection of actions associated with the behavior. This is a dependency property.
Declaration
public ActionCollection Actions { get; }
Property Value
Type | Description |
---|---|
ActionCollection | The actions. |
AssociatedObject
Gets the DependencyObject to which the IBehavior is attached.
Declaration
public DependencyObject AssociatedObject { get; }
Property Value
Type | Description |
---|---|
DependencyObject |
EventName
Gets or sets the name of the event to listen for. This is a dependency property.
Declaration
public string EventName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the event. |
SourceObject
Gets or sets the source object from which this behavior listens for events. If SourceObject is not set, the source will default to AssociatedObject. This is a dependency property.
Declaration
public object SourceObject { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The source object. |
Methods
Attach(DependencyObject)
Attaches to the specified object.
Declaration
public void Attach(DependencyObject associatedObject)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | associatedObject | The DependencyObject to which the IBehavior will be attached. |
Detach()
Detaches this instance from its associated object.
Declaration
public void Detach()