CommandTriggerAction Class

Summary

This CommandTriggerAction can be used to bind any event on any FrameworkElement to an ICommand. This trigger can only be attached to a FrameworkElement or a class deriving from FrameworkElement. This class is inspired from Laurent Bugnion and his EventToCommand. http://www.mvvmlight.net See license.txt in this solution or http://www.galasoft.ch/license_MIT.txt
Namespace
MahApps.Metro.Actions
Base Types
  • TriggerAction<FrameworkElement>
Derived Types
graph BT Type-->Base0["TriggerAction<FrameworkElement>"] Type["CommandTriggerAction"] class Type type-node Derived0["CloseTabItemAction"]-->Type click Derived0 "/api/MahApps.Metro.Actions/CloseTabItemAction" Derived1["CloseFlyoutAction"]-->Type click Derived1 "/api/MahApps.Metro.Actions/CloseFlyoutAction"

Syntax

public class CommandTriggerAction : TriggerAction<FrameworkElement>

Fields

Name Constant Value Summary
CommandParameterProperty
Identifies the CommandParameter dependency property
static
CommandProperty
Identifies the Command dependency property
static

Properties

Name Value Summary
Command ICommand
Gets or sets the command that this trigger is bound to.
CommandParameter object
Gets or sets an object that will be passed to the Command attached to this trigger.

Methods

Name Value Summary
GetCommandParameter() object
Invoke(object) void
OnAttached() void