How to handle wpf datagrid MouseMove event in viewmodel...in MVVM pattern? [duplicate]
HI,
I have a wpf-datagrid in view, i am following mvvm model...so no code in "codebehind". I wud like to handle "mousemove" eve开发者_如何转开发nt in viewmodel..how do i do this ?
I would handle this in the code behind! The MVVM-pattern doesn't prohibit some code in the code behind.
The question is what are you going to handle in the MouseMove event? Is it something view specific? If so, you can handle it in the code behind, which is a part of the view.
Or are you going to handle something that will inkvoke some action in the business objects? If so, consider to invoke a ICommand
command.
精彩评论