How to obey the MVVM pattern in thi scenario

Sep 4, 2009 at 9:38 AM

It is easy to binding a command to a button click command property when using MVVM pattern  .

But how to binding the command to a double-click event on datagrid control ?

Does someone know ?

 

Sep 4, 2009 at 11:49 AM

Use a behavior for that. http://kishordaher.wordpress.com/2009/07/18/routedevent-to-command-action-behavior-blend-3/

Coordinator
Sep 4, 2009 at 8:29 PM

wekempf, thanks for posting the link.  ms44cn, please feel free to follow up with us if you have any further questions.

Thanks,

Saied K.

Sep 7, 2009 at 6:41 AM

good example .

Thanks .

I have another problem  when implement the MVVM pattern .

When I need do some UI validations ,where I can put my validation code ?

For example :

I have textbox in the UI , and I wanna this textbox should't be empty and can't  include digital   . How can I check it under MVVM pattern  ?

 

Thanks.

 

Sep 8, 2009 at 2:58 AM

No one encounter such problem  ?

 

Sep 8, 2009 at 10:11 AM

Implement IDataErrorInfo on the ViewModel, and you're done, basically.

Sep 11, 2009 at 8:21 AM

Take a look here.... http://joshsmithonwpf.wordpress.com/2008/11/14/using-a-viewmodel-to-provide-meaningful-validation-error-messages/