Device 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用于与当前设备/平台进行交互的实用程序类。
public static class Device
type Device = class
- 继承
-
System.ObjectDevice
字段
Android |
字符串“Android”,表示 Android 操作系统。 |
GTK |
字符串“GTK”,表示 Linux 操作系统。 |
info |
供 Xamarin.Forms 平台内部使用。 |
iOS |
字符串“iOS”,表示 iOS 操作系统。 |
macOS |
字符串“macOS”,表示 macOS 操作系统。 |
Tizen |
字符串“Tizen”,表示 Tizen 操作系统。 |
UWP |
字符串“UWP”,表示 UWP 操作系统。 |
WPF |
字符串"WPF",表示 Windows Presentation Foundation 框架。 |
属性
Flags |
获取在初始化 Xamarin.Forms 之前在设备上设置的自定义标志列表。 |
FlowDirection |
获取设备上的流方向。 |
Idiom |
获取 Xamarin.Forms 当前正在处理的设备类型。 |
Info |
供 Xamarin.Forms 平台内部使用。 |
IsInvokeRequired |
供 Xamarin.Forms 平台内部使用。 |
OS |
已过时.
获取指示 OS Xamarin.Forms 正在处理的 TargetPlatform。 |
PlatformInvalidator |
用于与当前设备/平台进行交互的实用程序类。 |
PlatformServices |
供 Xamarin.Forms 平台内部使用。 |
RuntimePlatform |
获取 Xamarin.Forms 当前正在处理的设备类型。 |