Skip to content

Instantly share code, notes, and snippets.

@tmyt
Created December 30, 2015 11:27
Show Gist options
  • Save tmyt/33ef4c1f1651a83a7304 to your computer and use it in GitHub Desktop.
Save tmyt/33ef4c1f1651a83a7304 to your computer and use it in GitHub Desktop.
public static class PlatformDetector
{
public static bool IsWindows10_10240()
{
return typeof(Windows.UI.ViewManagement.ApplicationView)?.GetRuntimeProperty("PreferredLaunchViewSize") != null;
}
public static bool IsWindows10_10586()
{
return typeof(Windows.UI.Core.CoreWindow)?.GetRuntimeEvent("PointerRoutedAway") != null;
}
public static bool IsWindowsMobile10()
{
return ApiInformation.IsTypePresent("Windows.Phone.PhoneContract");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment