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>
2.1m questions
2.1m answers
60 comments
57.0k users