Created
December 30, 2015 11:27
-
-
Save tmyt/33ef4c1f1651a83a7304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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