btreptow@logis.org

MouseMove Event & MVVM

Discussion created by btreptow@logis.org on Oct 13, 2011
Latest reply on Oct 17, 2011 by copeland
I'm trying to display the mouse cursor coordinate location in a text box on my map. Easy to do with a MouseMove event and the Map.ScreenToMap() method in the code behind, not so easily done using MVVM though. This is because sending the "sender" object (the Map control in this case) to the view model makes the the view model "aware" of the view and essentially defeats the purpose of using the MVVM pattern. Plus, from what I understand about MVVM, you don't want controls in your vm eithers.

Does anybody have any suggestions on a better way to do this?

Outcomes