开发者

How to handle wpf datagrid MouseMove event in viewmodel...in MVVM pattern? [duplicate]

This question already has an answer here: WPF - Handling events from user control in View Model (1 answer) Closed 5 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜