I recently had issues with not knowing what platform my application was running on and wanted to have a specific UI depending on the platform and not depending on the size of the window.
Previously I had created a simple class (here) that allows you very simply detect what platform you are running on. Next all I needed was to create a custom state trigger based on my previous class and we will be able to detect whether we are running on a Mobile, Tablet or Xbox platform.
First we need to create class that inherits from StateTriggerBase as follows:
what we have here is that we get the current platform type and check to see if our DeviceFamily property is of the same value, if so then the trigger will return an IsActive to true.
Here is how to use it in your XAML code: (the data in here is fake of course)
What we can see here is that the state AbcVisualStateNormal will be called when we have MinWindowWidth="400" or when DeviceFamily="Xbox".
As you can see it was quite simple =)
Here are my 2 classes that you will need DeviceTypeHelper.cs and DeviceFamilyStateTrigger.cs