MouseDevice and MouseCapabilities

In addition to the generic PointerDevice class, the Windows.Devices.Input namespace contains a MouseDevice class with two interesting members:

A static GetForCurrentView method that returns the current MouseDevice if one exists (or the primary one if there is more than one mouse)

A MouseMoved event that is just like PointerMoved, but raised only for pointer movement from this specific mouse

So there still is one “mouse event” in the framework—it’s just a little hard to find! Note that the MouseDevice class has no relation to PointerDevice other than its similar name.

Similar to TouchCapabilities, an awkward MouseCapabilities class provides information about any connected mice. After instantiating a MouseCapabilities ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.