45 references to DeviceInfo
Microsoft.Maui.Controls (27)
Device.cs (2)
57
var idiom =
DeviceInfo
.Idiom;
74
public static string RuntimePlatform =>
DeviceInfo
.Platform.ToString();
DeviceStateTrigger.cs (2)
46
SetActive(
DeviceInfo
.Platform == DevicePlatform.WinUI);
48
SetActive(
DeviceInfo
.Platform == device);
FlyoutPage\FlyoutPage.cs (3)
166
if (
DeviceInfo
.Idiom == DeviceIdiom.Phone)
183
if (
DeviceInfo
.Idiom == DeviceIdiom.Phone)
303
return
DeviceInfo
.Platform == DevicePlatform.macOS;
ListView\ListView.cs (4)
120
if (
DeviceInfo
.Platform == DevicePlatform.Unknown ||
121
DeviceInfo
.Platform == DevicePlatform.Android ||
122
DeviceInfo
.Platform == DevicePlatform.iOS ||
123
DeviceInfo
.Platform == DevicePlatform.macOS)
OnIdiom.cs (1)
78
var idiom =
DeviceInfo
.Idiom;
OnPlatform.cs (2)
42
if (!onPlat.Platform.Contains(
DeviceInfo
.Platform.ToString()))
50
if (onPlat.Platform != null && onPlat.Platform.Contains("UWP") &&
DeviceInfo
.Platform == DevicePlatform.WinUI)
RadioButton\RadioButton.cs (1)
638
Application.Current?.FindMauiContext()?.CreateLogger<RadioButton>()?.LogWarning("Warning - {RuntimePlatform} does not support View as the {PropertyName} property of RadioButton; the return value of the ToString() method will be displayed instead.",
DeviceInfo
.Platform, ContentProperty.PropertyName);
Shell\BaseShellItem.cs (3)
432
else if (
DeviceInfo
.Platform == DevicePlatform.Tizen)
463
else if (
DeviceInfo
.Platform == DevicePlatform.Tizen)
515
else if (
DeviceInfo
.Platform == DevicePlatform.Tizen)
Shell\Shell.cs (1)
85
defaultValueCreator: (b) =>
DeviceInfo
.Platform == DevicePlatform.Android);
TemplatedItemsList.cs (1)
1221
if (
DeviceInfo
.Platform == DevicePlatform.iOS && CachingStrategy == ListViewCachingStrategy.RetainElement)
Visuals\VisualMarker.cs (5)
31
if (
DeviceInfo
.Platform == DevicePlatform.iOS ||
DeviceInfo
.Platform == DevicePlatform.Android ||
DeviceInfo
.Platform == DevicePlatform.Tizen)
32
logger?.LogWarning("Material needs to be registered on {RuntimePlatform} by calling FormsMaterial.Init() after the Microsoft.Maui.Controls.Forms.Init method call.",
DeviceInfo
.Platform);
34
logger?.LogWarning("Material is currently not support on {RuntimePlatform}.",
DeviceInfo
.Platform);
WebView\WebView.cs (2)
123
if (
DeviceInfo
.Platform != DevicePlatform.Android)
127
if (
DeviceInfo
.Platform != DevicePlatform.WinUI)
Microsoft.Maui.Controls.Xaml (17)
MarkupExtensions\OnIdiomExtension.cs (5)
111
if (
DeviceInfo
.Idiom == DeviceIdiom.Phone)
113
if (
DeviceInfo
.Idiom == DeviceIdiom.Tablet)
115
if (
DeviceInfo
.Idiom == DeviceIdiom.Desktop)
117
if (
DeviceInfo
.Idiom == DeviceIdiom.TV)
119
if (
DeviceInfo
.Idiom == DeviceIdiom.Watch)
MarkupExtensions\OnPlatformExtension.cs (10)
130
if (
DeviceInfo
.Platform == DevicePlatform.Android && Android != s_notset)
135
if (
DeviceInfo
.Platform == DevicePlatform.Create("GTK") && GTK != s_notset)
140
if (
DeviceInfo
.Platform == DevicePlatform.iOS && iOS != s_notset)
145
if (
DeviceInfo
.Platform == DevicePlatform.macOS && macOS != s_notset)
150
if (
DeviceInfo
.Platform == DevicePlatform.MacCatalyst && MacCatalyst != s_notset)
155
if (
DeviceInfo
.Platform == DevicePlatform.Tizen && Tizen != s_notset)
160
if (
DeviceInfo
.Platform == DevicePlatform.WinUI && WinUI != s_notset)
166
if (
DeviceInfo
.Platform == DevicePlatform.WinUI && UWP != s_notset)
171
if (
DeviceInfo
.Platform == DevicePlatform.Create("UWP") && UWP != s_notset)
177
if (
DeviceInfo
.Platform == DevicePlatform.Create("WPF") && WPF != s_notset)
XamlParser.cs (2)
300
if (targetPlatform !=
DeviceInfo
.Platform.ToString())
303
if (targetPlatform == "Windows" &&
DeviceInfo
.Platform == DevicePlatform.WinUI)
Microsoft.Maui.Essentials (1)
FilePicker\FilePicker.shared.cs (1)
158
public IEnumerable<string> Value => GetPlatformFileType(
DeviceInfo
.Current.Platform);