I have a list box in my WPF application. I know how to use the selectionchanged event. However I am trying to follow the MVVM design. However I am not sure how to do this.>
Example of binding ListBox SelectionChanged
Event to command in your ViewModel
In your ViewModel
:
public class myViewModel
{
public myViewModel()
{
SelectedItemChangedCommand = new DelegateCommand
This particular example uses Prism MVVM Framework, but you can apply the same idea with any other MVVM framework you are using as well.
Hope this helps