Warning. Any form of device discovery is fragile due to the dynamic nature of the hardware - a new device may arrive tomorrow, which will violate your application logic. It is best to use these APIs only for telemetry / analytics, and not for running runtime behavior.
Most often, what you really want to know is some attribute of a device or application that is not associated with a device family (does this device support the SystemTray API? Is there a keyboard there? Is this a window with a width of more than 500 pixels? Etc.).
However, in Windows 10, you can request DeviceFamily through AnalyticsInfo.VersionInfo.DeviceFamily , and it will tell you things like Mobile or Desktop or Xbox, etc. (Where "Mobile" can be any class of devices - phone, tablet, etc.). There is also a DeviceForm property that can be useful, but again you cannot really rely on it at runtime to deterministically say that you are working on a “phone”.
Thus, the main answer is that "you can use these APIs for telemetry, but don’t enter any values in your application so that it does not break when a new device arrives on the market." At the very least, always make sure you handle the case where the return value is not what you know about a priori.
Peter Torr - MSFT
source share