0

I started to use MVVM pattern in my app, I have ListView and I want to raplace:

<ListView>
     <ListViewItem PreviewMouseDown="Choose_PreviewMouseDown"/>
</ListView>

with something like:

<ListView>
     <ListViewItem PreviewMouseDown="{Binding PreviewMouseDownCommand}"/>
</ListView>

but it says: 'PreviewMouseDownCommand' is not a method

Update

There is answer here

Community
  • 1
  • 1
BugsFixer
  • 377
  • 2
  • 15
  • Possible duplicate of [WPF Event Binding to ViewModel (for non-Command classes)](https://stackoverflow.com/questions/6430256/wpf-event-binding-to-viewmodel-for-non-command-classes) – Sinatr Jan 22 '19 at 15:52
  • 2
    Possible duplicate of [WPF Binding UI events to commands in ViewModel](https://stackoverflow.com/questions/4897775/wpf-binding-ui-events-to-commands-in-viewmodel) – Jonatan Dragon Jan 22 '19 at 16:04

0 Answers0