I am trying to perform listbox changed event in WPF using MVVM. Please let me know how to do this selectionchanged event.
You can do it using
System.Windows.Interactivity
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
Then
<ListBox> <i:Interaction.Triggers> <i:EventTrigger EventName="SelectionChanged"> <i:InvokeCommandAction Command="{Binding YourCommand}" CommandParameter="{Binding YourCommandParameter}" /> </i:EventTrigger> </i:Interaction.Triggers> </ListBox>
1.4m articles
1.4m replys
5 comments
57.0k users