EventToCommandAdapter ClassDW.WPFToolkit Documentation
Brings the possibility to append one or more EventToCommand behaviors onto a control.
Inheritance Hierarchy

SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      DW.WPFToolkit.HelpersEventToCommandAdapter

Namespace: DW.WPFToolkit.Helpers
Assembly: DW.WPFToolkit (in DW.WPFToolkit.dll) Version: 5.6.0.0
Syntax

C#
public class EventToCommandAdapter : DependencyObject

The EventToCommandAdapter type exposes the following members.

Methods

  NameDescription
Public methodStatic memberGetEventsToCommands
Gets the attached EventToCommandCollection behavior.
Public methodStatic memberGetEventToCommand
Gets the attached EventToCommand behavior.
Public methodStatic memberSetEventsToCommands
Sets the attached EventToCommandCollection behavior.
Public methodStatic memberSetEventToCommand
Sets the attached EventToCommand behavior.
Top
Fields

  NameDescription
Public fieldStatic memberEventsToCommandsProperty
Public fieldStatic memberEventToCommandProperty
Top
Attached Properties

  NameDescription
Public attached propertyEventsToCommands
Public attached propertyEventToCommand
Top
Examples

XAML
<StackPanel>
    <Button Content="Demo Single">
        <Helpers:EventToCommandAdapter.EventToCommand>
            <Helpers:EventToCommand Event="MouseLeave" Command="{Binding MouseLeaveCommand}" />
        </Helpers:EventToCommandAdapter.EventToCommand>
    </Button>

    <Button Content="Demo Multiple">
        <Helpers:EventToCommandAdapter.EventsToCommands>
            <Helpers:EventToCommandCollection>
                <Helpers:EventToCommand Event="Click" Command="{Binding ClickCommand}" />
                <Helpers:EventToCommand Event="MouseEnter" Command="{Binding MouseEnterCommand}" />
                <Helpers:EventToCommand Event="MouseLeave" Command="{Binding MouseLeaveCommand}" />
            </Helpers:EventToCommandCollection>
        </Helpers:EventToCommandAdapter.EventsToCommands>
    </Button>
</StackPanel>
See Also

Reference