I wanted to be able to detect on what kind of device my UWP application was running and did not wanted to reinvent the wheel, I looked at what Wagonli did here and adapted it to my needs.
All I needed this helper to do was to tell me whether my application was running on a Phone or Tablet device. For me I don't really fined it necessary to need to differentiate Desktop and Tablet for me its the same thing( for my UWP apps).
And for the fun i added Xbox so that you can also check if your appliction is running on a Windows 10 Xbox (Thanks @RudyHuyn)
Thus I ended up with this:
My gist: https://gist.github.com/Delaire/37cbe07738df34bfd5e8
Original gist: https://gist.github.com/wagonli/40d8a31bd0d6f0dd7a5d