Class EventTrigger
Implements Event Trigger for triggering actions on routed event
Inherited Members
Namespace: EmptyKeys.UserInterface
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class EventTrigger : TriggerBase
Constructors
EventTrigger(RoutedEvent)
Initializes a new instance of the EventTrigger class.
Declaration
public EventTrigger(RoutedEvent routedEvent)
Parameters
| Type | Name | Description |
|---|---|---|
| RoutedEvent | routedEvent | The routed event. |
EventTrigger(RoutedEvent, UIElement)
Initializes a new instance of the EventTrigger class.
Declaration
public EventTrigger(RoutedEvent routedEvent, UIElement source)
Parameters
| Type | Name | Description |
|---|---|---|
| RoutedEvent | routedEvent | The routed event. |
| UIElement | source | The source. |
Fields
CommandParameterProperty
The command parameter property
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
CommandPathProperty
The command path property
Declaration
public static readonly DependencyProperty CommandPathProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
CommandProperty
The command path property
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
Actions
Gets the actions.
Declaration
public List<TriggerAction> Actions { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<TriggerAction> | The actions. |
RoutedEvent
Gets or sets the routed event.
Declaration
public RoutedEvent RoutedEvent { get; set; }
Property Value
| Type | Description |
|---|---|
| RoutedEvent | The routed event. |
Methods
AddAction(TriggerAction)
Adds the action.
Declaration
public void AddAction(TriggerAction action)
Parameters
| Type | Name | Description |
|---|---|---|
| TriggerAction | action | The action. |
GetCommand(DependencyObject)
Gets the command.
Declaration
public static ICommand GetCommand(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
Returns
| Type | Description |
|---|---|
| ICommand |
GetCommandParameter(DependencyObject)
Gets the command parameter.
Declaration
public static object GetCommandParameter(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
Returns
| Type | Description |
|---|---|
| System.Object |
GetCommandPath(DependencyObject)
Gets the command path.
Declaration
public static string GetCommandPath(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
Returns
| Type | Description |
|---|---|
| System.String |
RemoveAction(TriggerAction)
Removes the action.
Declaration
public void RemoveAction(TriggerAction action)
Parameters
| Type | Name | Description |
|---|---|---|
| TriggerAction | action | The action. |
SetCommand(DependencyObject, ICommand)
Sets the command.
Declaration
public static void SetCommand(DependencyObject obj, ICommand value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
| ICommand | value | The value. |
SetCommandParameter(DependencyObject, Object)
Sets the command parameter.
Declaration
public static void SetCommandParameter(DependencyObject obj, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
| System.Object | value | The value. |
SetCommandPath(DependencyObject, String)
Sets the command path.
Declaration
public static void SetCommandPath(DependencyObject obj, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
| System.String | value | The value. |