Events Interactivity in WPF MVVM
In our last Article we have learned to create a sample application using WPF MVVM pattern including Inotify properties, Relay commands,Button click events. In this article , we will learn how to fire other events in MVVM, for example if we need to fire double mouse click in WPF, we just need to create a new event handle on doublemouse click event but in MVVM it is not the case, because we cannot dorectly write the code for events in .cs form.So we need to use the RelayCommands for these events also, same as we have use dfor signle button click. So if we bind a command of button to a relay command, by default it would call a Singleleftmouseclick, but what we need to bind that command to doublemouseleftclick. So for handling these types of events in MVVM we use :System.Windows.Interactivity; Lets see how to use that: Step 1: Just add a button control in MainWindow.xaml . Step 2: Add reference "System.Windows.Interactivity" to solution explorer=>r...