Skip to content

Commit ca3ec71

Browse files
Copilotjfversluis
authored andcommitted
Convert fourth batch (50 files) of XML docs to inline documentation
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
1 parent 49e9abe commit ca3ec71

38 files changed

+176
-129
lines changed

src/Controls/src/Core/DatePicker/DatePicker.cs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Microsoft.Maui.Controls
88
{
9-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="Type[@FullName='Microsoft.Maui.Controls.DatePicker']/Docs/*" />
9+
/// <summary>A <see cref="T:Microsoft.Maui.Controls.View"/> that allows date picking.</summary>
1010
[DebuggerDisplay("{GetDebuggerDisplay(), nq}")]
1111
public partial class DatePicker : View, IFontElement, ITextElement, IElementConfiguration<DatePicker>, IDatePicker
1212
{
@@ -47,20 +47,21 @@ public partial class DatePicker : View, IFontElement, ITextElement, IElementConf
4747

4848
readonly Lazy<PlatformConfigurationRegistry<DatePicker>> _platformConfigurationRegistry;
4949

50-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
50+
/// <summary>Initializes a new instance of the DatePicker class.</summary>
5151
public DatePicker()
5252
{
5353
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<DatePicker>>(() => new PlatformConfigurationRegistry<DatePicker>(this));
5454
}
5555

56-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='Date']/Docs/*" />
56+
/// <summary>Gets or sets the displayed date. This is a bindable property.</summary>
5757
public DateTime Date
5858
{
5959
get { return (DateTime)GetValue(DateProperty); }
6060
set { SetValue(DateProperty, value); }
6161
}
6262

63-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='Format']/Docs/*" />
63+
/// <summary>The format of the date to display to the user. This is a dependency property.</summary>
64+
/// <remarks>Format string is the same is passed to DateTime.ToString (string format).</remarks>
6465
public string Format
6566
{
6667
get { return (string)GetValue(FormatProperty); }
@@ -73,21 +74,21 @@ TextTransform ITextElement.TextTransform
7374
set { }
7475
}
7576

76-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='MaximumDate']/Docs/*" />
77+
/// <summary>The highest date selectable for this DatePicker. This is a bindable property.</summary>
7778
public DateTime MaximumDate
7879
{
7980
get { return (DateTime)GetValue(MaximumDateProperty); }
8081
set { SetValue(MaximumDateProperty, value); }
8182
}
8283

83-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='MinimumDate']/Docs/*" />
84+
/// <summary>The lowest date selectable for this DatePicker. This is a bindable property.</summary>
8485
public DateTime MinimumDate
8586
{
8687
get { return (DateTime)GetValue(MinimumDateProperty); }
8788
set { SetValue(MinimumDateProperty, value); }
8889
}
8990

90-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='TextColor']/Docs/*" />
91+
/// <summary>Gets or sets the text color for the date picker. This is a bindable property.</summary>
9192
public Color TextColor
9293
{
9394
get { return (Color)GetValue(TextElement.TextColorProperty); }
@@ -101,21 +102,21 @@ public double CharacterSpacing
101102
set { SetValue(TextElement.CharacterSpacingProperty, value); }
102103
}
103104

104-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='FontAttributes']/Docs/*" />
105+
/// <summary>Gets a value that indicates whether the font for the date picker text is bold, italic, or neither. This is a bindable property.</summary>
105106
public FontAttributes FontAttributes
106107
{
107108
get { return (FontAttributes)GetValue(FontAttributesProperty); }
108109
set { SetValue(FontAttributesProperty, value); }
109110
}
110111

111-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='FontFamily']/Docs/*" />
112+
/// <summary>Gets or sets the font family for the picker text. This is a bindable property.</summary>
112113
public string FontFamily
113114
{
114115
get { return (string)GetValue(FontFamilyProperty); }
115116
set { SetValue(FontFamilyProperty, value); }
116117
}
117118

118-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='FontSize']/Docs/*" />
119+
/// <summary>Gets or sets the size of the font for the text in the picker.</summary>
119120
[System.ComponentModel.TypeConverter(typeof(FontSizeConverter))]
120121
public double FontSize
121122
{
@@ -154,7 +155,8 @@ void ITextElement.OnTextTransformChanged(TextTransform oldValue, TextTransform n
154155
{
155156
}
156157

157-
/// <include file="../../docs/Microsoft.Maui.Controls/DatePicker.xml" path="//Member[@MemberName='UpdateFormsText']/Docs/*" />
158+
/// <param name="source">To be added.</param>
159+
/// <param name="textTransform">To be added.</param>
158160
public virtual string UpdateFormsText(string source, TextTransform textTransform)
159161
=> TextTransformUtilites.GetTransformedText(source, textTransform);
160162

src/Controls/src/Core/DecorableTextElement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ static class DecorableTextElement
1111
public static readonly BindableProperty TextDecorationsProperty = BindableProperty.Create(nameof(IDecorableTextElement.TextDecorations), typeof(TextDecorations), typeof(IDecorableTextElement), TextDecorations.None);
1212
}
1313

14-
/// <include file="../../docs/Microsoft.Maui.Controls/TextDecorationConverter.xml" path="Type[@FullName='Microsoft.Maui.Controls.TextDecorationConverter']/Docs/*" />
14+
/// <summary>A <see cref="T:System.ComponentModel.TypeConverter"/> subclass that can convert between a string and a <see cref="T:Microsoft.Maui.TextDecorations"/> object.</summary>
1515
public class TextDecorationConverter : TypeConverter
1616
{
1717
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)

src/Controls/src/Core/DependencyAttribute.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
namespace Microsoft.Maui.Controls
66
{
7-
/// <include file="../../docs/Microsoft.Maui.Controls/DependencyAttribute.xml" path="Type[@FullName='Microsoft.Maui.Controls.DependencyAttribute']/Docs/*" />
7+
/// <summary>An attribute that indicates that the specified type provides a concrete implementation of a needed interface.</summary>
88
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
99
public sealed class DependencyAttribute : Attribute
1010
{
11-
/// <include file="../../docs/Microsoft.Maui.Controls/DependencyAttribute.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
11+
/// <summary>Creates a new <see cref="T:Microsoft.Maui.Controls.DependencyAttribute"/> with default values.</summary>
12+
/// <param name="implementorType">The type of the implementor of the dependency.</param>
1213
public DependencyAttribute(
1314
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type implementorType)
1415
{
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
namespace Microsoft.Maui.Controls
22
{
3-
/// <include file="../../docs/Microsoft.Maui.Controls/DependencyFetchTarget.xml" path="Type[@FullName='Microsoft.Maui.Controls.DependencyFetchTarget']/Docs/*" />
3+
/// <summary>Enumeration specifying whether <see cref="M:Microsoft.Maui.Controls.DependencyService.Get``1(Microsoft.Maui.Controls.DependencyFetchTarget)"/> should return a reference to a global or new instance.</summary>
44
public enum DependencyFetchTarget
55
{
6-
/// <include file="../../docs/Microsoft.Maui.Controls/DependencyFetchTarget.xml" path="//Member[@MemberName='GlobalInstance']/Docs/*" />
6+
/// <summary>Return a global instance.</summary>
77
GlobalInstance,
8-
/// <include file="../../docs/Microsoft.Maui.Controls/DependencyFetchTarget.xml" path="//Member[@MemberName='NewInstance']/Docs/*" />
8+
/// <summary>Return a new instance.</summary>
99
NewInstance
1010
}
1111
}

src/Controls/src/Core/DependencyResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Microsoft.Maui.Controls.Internals
88
{
9-
/// <include file="../../docs/Microsoft.Maui.Controls.Internals/DependencyResolver.xml" path="Type[@FullName='Microsoft.Maui.Controls.Internals.DependencyResolver']/Docs/*" />
9+
/// <summary>Contains static methods that add functions to use for resolving dependencies.</summary>
1010
public static class DependencyResolver
1111
{
1212
static Type _defaultVisualType = typeof(VisualMarker.DefaultVisual);

src/Controls/src/Core/DependencyService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Microsoft.Maui.Controls
1010
{
11-
/// <include file="../../docs/Microsoft.Maui.Controls/DependencyService.xml" path="Type[@FullName='Microsoft.Maui.Controls.DependencyService']/Docs/*" />
11+
/// <summary>Static class that provides the <see cref="M:Microsoft.Maui.Controls.DependencyService.Get``1(Microsoft.Maui.Controls.DependencyFetchTarget)"/> factory method for retrieving platform-specific implementations of the specified type T.</summary>
1212
public static class DependencyService
1313
{
1414
static bool s_initialized;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
namespace Microsoft.Maui.Controls
22
{
3-
/// <include file="../../docs/Microsoft.Maui.Controls/DesignMode.xml" path="Type[@FullName='Microsoft.Maui.Controls.DesignMode']/Docs/*" />
3+
/// <summary>Static class that developers can use to determine if the application is running in a previewer.</summary>
44
public static class DesignMode
55
{
6-
/// <include file="../../docs/Microsoft.Maui.Controls/DesignMode.xml" path="//Member[@MemberName='IsDesignModeEnabled']/Docs/*" />
6+
/// <summary>Indicates whether the application is being run in a previewer.</summary>
77
public static bool IsDesignModeEnabled { get; internal set; }
88
}
99
}

src/Controls/src/Core/Device.cs

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace 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
{

src/Controls/src/Core/DeviceOrientationExtensions.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ namespace Microsoft.Maui.Controls.Internals
55
{
66
static class DeviceOrientationExtensions
77
{
8-
/// <include file="../../docs/Microsoft.Maui.Controls.Internals/DeviceOrientationExtensions.xml" path="//Member[@MemberName='IsLandscape']/Docs/*" />
8+
/// <summary>For internal use by the Microsoft.Maui.Controls platform.</summary>
9+
/// <param name="orientation">For internal use by the Microsoft.Maui.Controls platform.</param>
10+
/// <returns>For internal use by the Microsoft.Maui.Controls platform.</returns>
911
public static bool IsLandscape(this DisplayOrientation orientation) =>
1012
orientation == DisplayOrientation.Landscape;
1113

12-
/// <include file="../../docs/Microsoft.Maui.Controls.Internals/DeviceOrientationExtensions.xml" path="//Member[@MemberName='IsPortrait']/Docs/*" />
14+
/// <summary>For internal use by the Microsoft.Maui.Controls platform.</summary>
15+
/// <param name="orientation">For internal use by the Microsoft.Maui.Controls platform.</param>
16+
/// <returns>For internal use by the Microsoft.Maui.Controls platform.</returns>
1317
public static bool IsPortrait(this DisplayOrientation orientation) =>
1418
orientation == DisplayOrientation.Portrait;
1519
}

src/Controls/src/Core/DragAndDrop/DataPackagePropertySet.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,21 @@ public object this[string key]
3030
/// <include file="../../../docs/Microsoft.Maui.Controls/DataPackagePropertySet.xml" path="//Member[@MemberName='Values']/Docs/*" />
3131
public IEnumerable<object> Values => _propertyBag.Values;
3232

33-
/// <include file="../../../docs/Microsoft.Maui.Controls/DataPackagePropertySet.xml" path="//Member[@MemberName='Add']/Docs/*" />
33+
/// <param name="key">To be added.</param>
34+
/// <param name="value">To be added.</param>
3435
public void Add(string key, object value)
3536
{
3637
_propertyBag.Add(key, value);
3738
}
3839

39-
/// <include file="../../../docs/Microsoft.Maui.Controls/DataPackagePropertySet.xml" path="//Member[@MemberName='ContainsKey']/Docs/*" />
40+
/// <param name="key">To be added.</param>
4041
public bool ContainsKey(string key) => _propertyBag.ContainsKey(key);
4142

4243
/// <include file="../../../docs/Microsoft.Maui.Controls/DataPackagePropertySet.xml" path="//Member[@MemberName='GetEnumerator']/Docs/*" />
4344
public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => _propertyBag.GetEnumerator();
4445

45-
/// <include file="../../../docs/Microsoft.Maui.Controls/DataPackagePropertySet.xml" path="//Member[@MemberName='TryGetValue']/Docs/*" />
46+
/// <param name="key">To be added.</param>
47+
/// <param name="value">To be added.</param>
4648
public bool TryGetValue(string key, out object value) => _propertyBag.TryGetValue(key, out value);
4749

4850
IEnumerator IEnumerable.GetEnumerator()

0 commit comments

Comments
 (0)