How do I make multiple event bindings with ImpromptuInterface.MVVM?
-
25-06-2021 - |
Frage
Binding to a single event with ImpromptuInterface.MVVM is very simple:
<DataGrid MVVM:Event.Bind="{Binding Events.RowEditEnding.To[DoRowEditEnding]}"
...
How do I bind to a second event in the same DataGrid control?
Lösung
You can always chain another event after the To
statement. Here is an example where I've used it to bind multiple mouse listening events from one object:
<Grid Background="{Binding Color}" MVVM:Event.Bind="{Binding Events.MouseEnter.To[CenterMouseEnter].MouseLeave.To[MouseLeave].MouseLeftButtonDown.To[LeftButtonClick]}"
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow