views:

40

answers:

1

HI,

I have a wpf-datagrid in view, i am following mvvm model...so no code in "codebehind". I wud like to handle "mousemove" event in viewmodel..how do i do this ?

+1  A: 

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.

WaltiD