c# - Display mouse position in Silverlight 5, MVVM -


for record: i'm new silverlight , xaml.

i'm trying display mouse coordinates relative in canvas (or other element). after reading lot on subject, unfortunantly havn't figured our yet. silverlight 5 project uses mvvm caliburn micro.

how can done? appreciate on implementing this.

thanks, guy.

you need little more specific control you're trying with, have tried wiring mousemove event? mousemove="handle_mousemove"

public void handle_mousemove(object sender, mouseeventargs args)  {     mouseverticalposition = args.getposition(null).y;     mousehorizontalposition = args.getposition(null).x; } 

is you're looking for?

if want happen on entire canvas, can instead wire pointermoved

see mouseeventargs. can x , y position , can used mouseup, mousedown, , mousemove events.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -