wpf controls - WPF Capture MouseMove -



wpf controls - WPF Capture MouseMove -

i have mouse move event captures position on canvas , displays tooltip. issue after time tooltip goes away , event doesn't fire. i've uploaded code move event. tt tooltip name.

private void canvas_mousemove(object sender, mouseeventargs e) { tt.placement = system.windows.controls.primitives.placementmode.relative; tt.horizontaloffset = e.getposition((iinputelement)sender).x + 10; tt.verticaloffset = e.getposition((iinputelement)sender).y + 10; tt.content = "x-coordinate: " + e.getposition((iinputelement)sender).x + "\n" + "y-coordinate: " + e.getposition((iinputelement)sender).y; }

as mentioned, not ideal usage tooltip, given requirements seem kind of quick test, may go on along same vein. such, can seek setting tooltip.isopen property true maintain tooltip open:

private void canvas_mousemove(object sender, mouseeventargs e) { tt.placement = system.windows.controls.primitives.placementmode.relative; tt.horizontaloffset = e.getposition((iinputelement)sender).x + 10; tt.verticaloffset = e.getposition((iinputelement)sender).y + 10; tt.content = "x-coordinate: " + e.getposition((iinputelement)sender).x + "\n" + "y-coordinate: " + e.getposition((iinputelement)sender).y; tt.isopen = true; }

wpf wpf-controls mouse

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -