1111
1212namespace Microsoft . Maui . Controls
1313{
14- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="Type[@FullName='Microsoft.Maui.Controls. Device']/Docs/*" / >
14+ /// <summary>A utility class to interact with the current Device/Platform.</summary >
1515 [ Obsolete ]
1616 public static class Device
1717 {
@@ -20,35 +20,35 @@ public static class Device
2020 [ EditorBrowsable ( EditorBrowsableState . Never ) ]
2121 public static Assembly DefaultRendererAssembly { get ; set ; }
2222
23- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName=' iOS']/Docs/*" / >
23+ /// <summary>The string " iOS", representing the iOS operating system.</summary >
2424 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.iOS instead." ) ]
2525 public const string iOS = "iOS" ;
26- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName=' Android']/Docs/*" / >
26+ /// <summary>The string " Android", representing the Android operating system.</summary >
2727 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.Android instead." ) ]
2828 public const string Android = "Android" ;
29- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName=' UWP']/Docs/*" / >
29+ /// <summary>The string " UWP", representing the UWP operating system.</summary >
3030 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.WinUI instead." ) ]
3131 public const string UWP = "WinUI" ;
32- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName=' macOS']/Docs/*" / >
32+ /// <summary>The string " macOS", representing the macOS operating system.</summary >
3333 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.macOS instead." ) ]
3434 internal const string macOS = "macOS" ;
35- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName=' GTK']/Docs/*" / >
35+ /// <summary>The string " GTK", representing the Linux operating system.</summary >
3636 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.GTK instead." ) ]
3737 internal const string GTK = "GTK" ;
38- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName=' Tizen']/Docs/*" / >
38+ /// <summary>The string " Tizen", representing the Tizen operating system.</summary >
3939 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.Tizen instead." ) ]
4040 public const string Tizen = "Tizen" ;
4141 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.WinUI instead." ) ]
4242 public const string WinUI = "WinUI" ;
43- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName=' WPF']/Docs/*" / >
43+ /// <summary>The string " WPF", representing the Windows Presentation Foundation framework.</summary >
4444 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.WPF instead." ) ]
4545 internal const string WPF = "WPF" ;
4646 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.MacCatalyst instead." ) ]
4747 public const string MacCatalyst = "MacCatalyst" ;
4848 [ Obsolete ( "Use Microsoft.Maui.Devices.DevicePlatform.tvOS instead." ) ]
4949 public const string tvOS = "tvOS" ;
5050
51- /// <include file="../../docs/ Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName='Idiom']/Docs/*" / >
51+ /// <summary>Gets the kind of device that Microsoft.Maui.Controls is currently working on.</summary >
5252 [ Obsolete ( "Use Microsoft.Maui.Devices.DeviceInfo.Idiom instead." ) ]
5353 public static TargetIdiom Idiom
5454 {
@@ -69,23 +69,28 @@ public static TargetIdiom Idiom
6969 }
7070 }
7171
72- /// <include file="../../docs/ Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName='RuntimePlatform']/Docs/*" / >
72+ /// <summary>Gets the kind of device that Microsoft.Maui.Controls is currently working on.</summary >
7373 [ Obsolete ( "Use Microsoft.Maui.Devices.DeviceInfo.Platform instead." ) ]
7474 public static string RuntimePlatform => DeviceInfo . Platform . ToString ( ) ;
7575
76- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName='FlowDirection']/Docs/*" />
76+ /// <summary>Gets the flow direction on the device.</summary>
77+ /// <remarks>The following contains a few important points about flow direction from
78+ /// The default value of
79+ /// All</remarks>
7780 [ Obsolete ( "Use Microsoft.Maui.ApplicationModel.AppInfo.RequestedLayoutDirection instead." ) ]
7881 public static FlowDirection FlowDirection =>
7982 AppInfo . RequestedLayoutDirection == LayoutDirection . RightToLeft
8083 ? FlowDirection . RightToLeft
8184 : FlowDirection . LeftToRight ;
8285
83- /// <include file="../../docs/ Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName='IsInvokeRequired']/Docs/*" / >
86+ /// <summary>For internal use by the Microsoft.Maui.Controls platform.</summary >
8487 [ Obsolete ( "Use BindableObject.Dispatcher.IsDispatchRequired instead." ) ]
8588 public static bool IsInvokeRequired =>
8689 Application . Current . FindDispatcher ( ) . IsDispatchRequired ;
8790
88- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName='BeginInvokeOnMainThread']/Docs/*" />
91+ /// <summary>Invokes an Action on the device main (UI) thread.</summary>
92+ /// <param name="action">The Action to invoke</param>
93+ /// <remarks>This example shows how to set the Text of Label on the main thread, e.g. in response to an async event.</remarks>
8994 [ Obsolete ( "Use BindableObject.Dispatcher.Dispatch() instead." ) ]
9095 public static void BeginInvokeOnMainThread ( Action action ) =>
9196 Application . Current . FindDispatcher ( ) . Dispatch ( action ) ;
@@ -110,7 +115,8 @@ public static Task<T> InvokeOnMainThreadAsync<T>(Func<Task<T>> funcTask) =>
110115 public static Task InvokeOnMainThreadAsync ( Func < Task > funcTask ) =>
111116 Application . Current . FindDispatcher ( ) . DispatchAsync ( funcTask ) ;
112117
113- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName='GetMainThreadSynchronizationContextAsync']/Docs/*" />
118+ /// <summary>Returns the current <see cref="T:System.Threading.SynchronizationContext"/> from the main thread.</summary>
119+ /// <returns>The current <see cref="T:System.Threading.SynchronizationContext"/> from the main thread.</returns>
114120 [ Obsolete ( "Use BindableObject.Dispatcher.GetSynchronizationContextAsync() instead." ) ]
115121 public static Task < SynchronizationContext > GetMainThreadSynchronizationContextAsync ( ) =>
116122 Application . Current . FindDispatcher ( ) . GetSynchronizationContextAsync ( ) ;
@@ -129,7 +135,11 @@ public static double GetNamedSize(NamedSize size, Type targetElementType)
129135 return GetNamedSize ( size , targetElementType , false ) ;
130136 }
131137
132- /// <include file="../../docs/Microsoft.Maui.Controls/Device.xml" path="//Member[@MemberName='StartTimer']/Docs/*" />
138+ /// <summary>Starts a recurring timer using the device clock capabilities.</summary>
139+ /// <param name="interval">The interval between invocations of the callback.</param>
140+ /// <param name="callback">The action to run when the timer elapses.</param>
141+ /// <remarks>While the callback returns
142+ /// If you want the code inside the timer to interact on the UI thread (e.g. setting text of a Label or showing an alert), it should be done within a</remarks>
133143 [ Obsolete ( "Use BindableObject.Dispatcher.StartTimer() or BindableObject.Dispatcher.DispatchDelayed() instead." ) ]
134144 public static void StartTimer ( TimeSpan interval , Func < bool > callback )
135145 {
0 commit comments