Xamarin.Forms by Xamarin Inc.

<PackageReference Include="Xamarin.Forms" Version="1.5.2.6478-pre3" />

.NET API 795,136 bytes

 Device

public static class Device
A utility class to interact with the current Device/Platform.
public static class Styles

public static TargetIdiom Idiom { get; }

Gets the kind of device that Xamarin.Forms is currently working on.

public static TargetPlatform OS { get; }

Gets the TargetPlatform indicating the OS Xamarin.Forms is working on.

public static void BeginInvokeOnMainThread(Action action)

Invokes an Action on the device main (UI) thread.

public static double GetNamedSize(NamedSize size, Element targetElement)

Returns a double that represents a font size that corresponds to size on targetElement.

public static double GetNamedSize(NamedSize size, Type targetElementType)

Returns a double that represents the named size for the font that is used on the element on the native platform.

public static void OnPlatform(Action iOS = null, Action Android = null, Action WinPhone = null, Action Default = null)

Executes different Actions depending on the TargetOS that Xamarin.Forms is working on.

public static T OnPlatform<T>(T iOS, T Android, T WinPhone)

Returns different values depending on the TargetOS Xamarin.Forms is working on.

public static void OpenUri(Uri uri)

Request the device to open the Uri.

public static void StartTimer(TimeSpan interval, Func<bool> callback)

Starts a recurring timer using the device clock capabilities.