WPF event binding from View to ViewModel?
问题 Whats the best way to bind a WPF event in the View to the ViewModel? I got a drop event in my View but I want to replace it to the ViewModel due binding. Found several solutions but none of them did what I aspected. View code: <TextBox AllowDrop="True" PreviewDrop="email_Drop" /> 回答1: One way to handle events in MVVM and XAML is to use the Blend Interactivity features. This namespace contains the InvokeCommandAction and the CallMethodAction classes. InvokeCommandAction lets you bind any event