7 instantiations of DeviceIdiom
Microsoft.Maui.Essentials (7)
Types\DeviceIdiom.shared.cs (7)
15
public static DeviceIdiom Phone { get; } = new
DeviceIdiom
(nameof(Phone));
20
public static DeviceIdiom Tablet { get; } = new
DeviceIdiom
(nameof(Tablet));
25
public static DeviceIdiom Desktop { get; } = new
DeviceIdiom
(nameof(Desktop));
30
public static DeviceIdiom TV { get; } = new
DeviceIdiom
(nameof(TV));
35
public static DeviceIdiom Watch { get; } = new
DeviceIdiom
(nameof(Watch));
40
public static DeviceIdiom Unknown { get; } = new
DeviceIdiom
(nameof(Unknown));
59
new
DeviceIdiom
(deviceIdiom);
46 references to DeviceIdiom
Microsoft.Maui.Controls (13)
Device.cs (6)
57
var
idiom = DeviceInfo.Idiom;
58
if (idiom ==
DeviceIdiom
.Tablet)
60
if (idiom ==
DeviceIdiom
.Phone)
62
if (idiom ==
DeviceIdiom
.Desktop)
64
if (idiom ==
DeviceIdiom
.TV)
66
if (idiom ==
DeviceIdiom
.Watch)
FlyoutPage\FlyoutPage.cs (2)
166
if (DeviceInfo.Idiom ==
DeviceIdiom
.Phone)
183
if (DeviceInfo.Idiom ==
DeviceIdiom
.Phone)
OnIdiom.cs (5)
78
var
idiom = DeviceInfo.Idiom;
79
if (idiom ==
DeviceIdiom
.Tablet)
81
else if (idiom ==
DeviceIdiom
.Desktop)
83
else if (idiom ==
DeviceIdiom
.TV)
85
else if (idiom ==
DeviceIdiom
.Watch)
Microsoft.Maui.Controls.Xaml (5)
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)
Microsoft.Maui.Essentials (28)
DeviceInfo\DeviceInfo.netstandard.cs (2)
20
public
DeviceIdiom
Idiom =>
DeviceIdiom
.Unknown;
DeviceInfo\DeviceInfo.shared.cs (2)
60
DeviceIdiom
Idiom { get; }
107
public static
DeviceIdiom
Idiom => Current.Idiom;
Types\DeviceIdiom.shared.cs (24)
8
public readonly struct DeviceIdiom : IEquatable<
DeviceIdiom
>
13
/// Gets an instance of <see cref="
DeviceIdiom
"/> that represents a (mobile) phone idiom.
15
public static
DeviceIdiom
Phone { get; } = new DeviceIdiom(nameof(Phone));
18
/// Gets an instance of <see cref="
DeviceIdiom
"/> that represents a tablet idiom.
20
public static
DeviceIdiom
Tablet { get; } = new DeviceIdiom(nameof(Tablet));
23
/// Gets an instance of <see cref="
DeviceIdiom
"/> that represents a desktop computer idiom.
25
public static
DeviceIdiom
Desktop { get; } = new DeviceIdiom(nameof(Desktop));
28
/// Gets an instance of <see cref="
DeviceIdiom
"/> that represents a television (TV) idiom.
30
public static
DeviceIdiom
TV { get; } = new DeviceIdiom(nameof(TV));
33
/// Gets an instance of <see cref="
DeviceIdiom
"/> that represents a watch idiom.
35
public static
DeviceIdiom
Watch { get; } = new DeviceIdiom(nameof(Watch));
38
/// Gets an instance of <see cref="
DeviceIdiom
"/> that represents an unknown idiom. This is used for when the current device idiom is unknown.
40
public static
DeviceIdiom
Unknown { get; } = new DeviceIdiom(nameof(Unknown));
57
/// <returns>A new instance of <see cref="
DeviceIdiom
"/> with the specified idiom type.</returns>
58
public static
DeviceIdiom
Create(string deviceIdiom) =>
62
/// Compares the underlying <see cref="
DeviceIdiom
"/> instances.
64
/// <param name="other"><see cref="
DeviceIdiom
"/> object to compare with.</param>
66
public bool Equals(
DeviceIdiom
other) =>
74
obj is
DeviceIdiom
&& Equals((
DeviceIdiom
)obj);
100
public static bool operator ==(
DeviceIdiom
left,
DeviceIdiom
right) =>
109
public static bool operator !=(
DeviceIdiom
left,
DeviceIdiom
right) =>