Generic routed event handler to command behavior
Scenario
Radical “Handle”
<TreeView Margin="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
ItemsSource="{Binding Path=MyListOfElements}">
<i:Interaction.Behaviors>
<behaviors:Handle RoutedEvent="TreeView.SelectedItemChanged"
WithCommand="{Binding Path=MyAmazingCommand}"
PassingIn="$args.NewValue" />
</i:Interaction.Behaviors>
<TreeView.ItemTemplate>
<!-- omitted -->
</TreeView.ItemTemplate>
</TreeView>Notes:
Last updated