Pen identity in UWP

When you are building apps for the Surface Hub you can use a real cool inking feature. The screen is already amazing with 84" and the pen support. But the pens also have an identity. This is a number and when you match this up with a credential you can do awesome things.

To get the pen identity you need few simple lines of code. I build an extension method for that:

public static class PointerPointPropertiesExtensions
    private const uint WirelessIdUsagePage = 0x0D;
    private const uint WirelessIdUsage = 0x5B;

    public static int? GetPenId(this PointerPointProperties pointerProperties)
        var hasId = pointerProperties.HasUsage(WirelessIdUsagePage, WirelessIdUsage);
        return hasId ? pointerProperties.GetUsageValue(WirelessIdUsagePage, WirelessIdUsage) : default(int?);
  •   My @VSTeam Activity Feed now featured!
  •   @Alex_A_Simons adding a service principle to an azure subscription from the UI seems to be impossible now aad in new portal?
  •   @skendrot @mahoekst i think?
  •   @JenMsft how your team is going to make fail awesome for dev's? We want goodies in our work too right? ☺
  •   @LocalJoost going be fun to see everyone with it at the airport
  •   @mahoekst ;P
  •   @mahoekst i hate big screen for dev.. getting pain in my neck of looking everywhere.
  •   Surface book , budget approved.. wat was de link? :)
  •   @tomverhoeff @panos_panay vr bril :)
  •   @NorthFaceHiker @donasarkar tnx.. didnt worked.. the other work around go to slow and change date worked for this one too