Quantcast
Viewing all articles
Browse latest Browse all 18858

WPF Canvas DoubleClickSize test?

So I need a double click event on a canvas that I am using.

I successfully see a double click using the mouse down event per some other code suggestions on the web, and I use the system.windows.forms.doubleclicktime property. Seeing this, I realized I needed to also make sure the mouse stayed within range of the first click - the range defined by system.windows.forms.doubleclicksize

What I noticed is that doubleclicksize has units of type pixel, while the canvas mouse events will be rendered in WPF units (they need a name, we use to have TWIPS :-)

How can I convert the pixels to WPF units that will come back from the invocations of GetPosition on the MouseEventArgs?



Scott Berger McCormick Systems


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>