How can I access the grids cell double click event in the ViewModel in WPF using MVVM pattern

Posted on 2013-10-16
Medium Priority
Last Modified: 2013-10-17
I need to acces the grid cell double click event in my viewmodel.
How can I achieve this
Question by:countrymeister
LVL 11

Expert Comment

by:Mihai Stancescu
ID: 39579445

What framework for mvvm are you using?

If you are using mvvm light you can use the eventtocommand and attach a command to the double click event.

LVL 27

Accepted Solution

MikeToole earned 2000 total points
ID: 39580607
One option is to be pragmatic about the 'no code-behind' mantra ...
Detect the double-click in code-behind, use the DataContext property of the window to retrieve the instance of your viewmodel and call a method of the viewmodel to process the event.

Featured Post

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
Through the video, you can check the migration process of Outlook PST file to PDF. Kernel for Outlook to PDF tool can convert Outlook emails with all attributes like Subject, To, From, Cc, Bcc and other folders such as Inbox, Outbox, Sent Items, Jun…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question