I’m getting floating point values like (471, 326.723333333333) from calling MouseEventArgs.GetPosition() on my border control. While I can always round the numbers manually, I was wondering if there’s some kind of setting to get whole numbers.
I thought putting SnapsToDevicePixels to True on my border control would help but it doesn’t, as it’s probably unrelated.
Any ideas?
Thanks!
In WPF, you’ll always have positioning returned in floating point values. If you want to round it, you’ll need to do this manually.
This is due to the resolution independence, and is by design.