Skip to content

Commit 7f6a599

Browse files
Copilotjfversluis
authored andcommitted
Convert second batch of XML docs to inline documentation
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
1 parent 95193a7 commit 7f6a599

9 files changed

+141
-85
lines changed

src/Controls/src/Core/AlertArguments.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44

55
namespace Microsoft.Maui.Controls.Internals
66
{
7-
/// <include file="../../docs/Microsoft.Maui.Controls.Internals/AlertArguments.xml" path="Type[@FullName='Microsoft.Maui.Controls.Internals.AlertArguments']/Docs/*" />
7+
/// <summary>For internal use by the Microsoft.Maui.Controls platform.</summary>
88
[EditorBrowsable(EditorBrowsableState.Never)]
99
public class AlertArguments
1010
{
11-
/// <include file="../../docs/Microsoft.Maui.Controls.Internals/AlertArguments.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
11+
/// <summary>For internal use by the Microsoft.Maui.Controls platform.</summary>
12+
/// <param name="title">For internal use by the Microsoft.Maui.Controls platform.</param>
13+
/// <param name="message">For internal use by the Microsoft.Maui.Controls platform.</param>
14+
/// <param name="accept">For internal use by the Microsoft.Maui.Controls platform.</param>
15+
/// <param name="cancel">For internal use by the Microsoft.Maui.Controls platform.</param>
1216
public AlertArguments(string title, string message, string accept, string cancel)
1317
{
1418
Title = title;
@@ -34,7 +38,7 @@ public AlertArguments(string title, string message, string accept, string cancel
3438
/// </summary>
3539
public string Message { get; private set; }
3640

37-
/// <include file="../../docs/Microsoft.Maui.Controls.Internals/AlertArguments.xml" path="//Member[@MemberName='Result']/Docs/*" />
41+
/// <summary>For internal use by the Microsoft.Maui.Controls platform.</summary>
3842
public TaskCompletionSource<bool> Result { get; }
3943

4044
public FlowDirection FlowDirection { get; set; }
@@ -44,7 +48,8 @@ public AlertArguments(string title, string message, string accept, string cancel
4448
/// </summary>
4549
public string Title { get; private set; }
4650

47-
/// <include file="../../docs/Microsoft.Maui.Controls.Internals/AlertArguments.xml" path="//Member[@MemberName='SetResult']/Docs/*" />
51+
/// <summary>For internal use by the Microsoft.Maui.Controls platform.</summary>
52+
/// <param name="result">For internal use by the Microsoft.Maui.Controls platform.</param>
4853
public void SetResult(bool result)
4954
{
5055
Result.TrySetResult(result);

src/Controls/src/Core/AnimationExtensions.cs

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
namespace Microsoft.Maui.Controls
3636
{
37-
/// <include file="../../docs/Microsoft.Maui.Controls/AnimationExtensions.xml" path="Type[@FullName='Microsoft.Maui.Controls.AnimationExtensions']/Docs/*" />
37+
/// <summary>Extension methods for <see cref="T:Microsoft.Maui.Controls.IAnimatable"/> objects.</summary>
3838
public static class AnimationExtensions
3939
{
4040
// We use a ConcurrentDictionary because Tweener relies on being able to remove
@@ -111,7 +111,9 @@ public static void Remove(this IAnimationManager animationManager, int tickerId)
111111
}
112112
}
113113

114-
/// <include file="../../docs/Microsoft.Maui.Controls/AnimationExtensions.xml" path="//Member[@MemberName='AbortAnimation']/Docs/*" />
114+
/// <summary>Stops the animation.</summary>
115+
/// <param name="self">The object on which this method will be run.</param>
116+
/// <param name="handle">An animation key that must be unique among its sibling and parent animations for the duration of the animation.</param>
115117
public static bool AbortAnimation(this IAnimatable self, string handle)
116118
{
117119
var key = new AnimatableKey(self, handle);
@@ -186,7 +188,13 @@ public static void Animate<T>(this IAnimatable self, string name, Func<double, T
186188
}
187189

188190

189-
/// <include file="../../docs/Microsoft.Maui.Controls/AnimationExtensions.xml" path="//Member[@MemberName='AnimateKinetic']/Docs/*" />
191+
/// <summary>Sets the specified parameters and starts the kinetic animation.</summary>
192+
/// <param name="self">The object on which this method will be run.</param>
193+
/// <param name="name">An animation key that should be unique among its sibling and parent animations for the duration of the animation.</param>
194+
/// <param name="callback">An action that is called with successive animation values.</param>
195+
/// <param name="velocity">The amount that the animation progresses in each animation step. For example, a velocity of <c>1</c> progresses at the default speed.</param>
196+
/// <param name="drag">The amount that the progression speed is reduced per frame. Can be negative.</param>
197+
/// <param name="finished">An action to call when the animation is finished.</param>
190198
#pragma warning disable CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do)
191199
public static void AnimateKinetic(this IAnimatable self, string name, Func<double, double, bool> callback, double velocity, double drag, Action finished = null, IAnimationManager animationManager = null)
192200
#pragma warning restore CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do)
@@ -197,21 +205,29 @@ public static void AnimateKinetic(this IAnimatable self, string name, Func<doubl
197205
DoAction(self, animate);
198206
}
199207

200-
/// <include file="../../docs/Microsoft.Maui.Controls/AnimationExtensions.xml" path="//Member[@MemberName='AnimationIsRunning']/Docs/*" />
208+
/// <summary>Returns a Boolean value that indicates whether or not the animation that is specified by <paramref name="handle"/> is running.</summary>
209+
/// <param name="self">The object on which this method will be run.</param>
210+
/// <param name="handle">An animation key that must be unique among its sibling and parent animations for the duration of the animation.</param>
201211
public static bool AnimationIsRunning(this IAnimatable self, string handle)
202212
{
203213
var key = new AnimatableKey(self, handle);
204214
return s_animations.ContainsKey(key);
205215
}
206216

207-
/// <include file="../../docs/Microsoft.Maui.Controls/AnimationExtensions.xml" path="//Member[@MemberName='Interpolate']/Docs/*" />
217+
/// <summary>Returns a function that performs a linear interpolation between <paramref name="start"/> and <paramref name="end"/>.</summary>
218+
/// <param name="start">The fraction into the current animation at which to start the animation.</param>
219+
/// <param name="end">The fraction into the current animation at which to stop the animation.</param>
220+
/// <param name="reverseVal">The inverse scale factor to use if <paramref name="reverse"/> is <see langword="true"/>.</param>
221+
/// <param name="reverse">Whether to use the inverse scale factor in <paramref name="reverseVal"/> to deinterpolate.</param>
222+
/// <returns>A function that performs a linear interpolation between <paramref name="start"/> and <paramref name="end"/>. Application developers can pass values between 0.0f and 1.0f to this function in order to recieve a value that is offset from <paramref name="start"/> or <paramref name="end"/>, depending on the value of <paramref name="reverse"/>, by the passed value times the distance between <paramref name="start"/> and <paramref name="end"/>.</returns>
223+
/// <remarks>If <paramref name="reverse"/> is <see langword="true"/>, then the interpolation happens between <paramref name="start"/> and <paramref name="reverseVal"/>.</remarks>
208224
public static Func<double, double> Interpolate(double start, double end = 1.0f, double reverseVal = 0.0f, bool reverse = false)
209225
{
210226
double target = reverse ? reverseVal : end;
211227
return x => start + (target - start) * x;
212228
}
213229

214-
/// <include file="../../docs/Microsoft.Maui.Controls/AnimationExtensions.xml" path="//Member[@MemberName='Batch']/Docs/*" />
230+
/// <param name="self">To be added.</param>
215231
public static IDisposable Batch(this IAnimatable self) => new BatchObject(self);
216232

217233
static void AbortAnimation(AnimatableKey key)

src/Controls/src/Core/AppLinkEntry.cs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
namespace Microsoft.Maui.Controls
66
{
7-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="Type[@FullName='Microsoft.Maui.Controls.AppLinkEntry']/Docs/*" />
7+
/// <summary>A deep application link in an app link search index.</summary>
88
public class AppLinkEntry : Element, IAppLinkEntry
99
{
1010
readonly Dictionary<string, string> keyValues;
1111

12-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
12+
/// <summary>Creates a new <see cref="T:Microsoft.Maui.Controls.AppLinkEntry"/> with default values.</summary>
1313
public AppLinkEntry()
1414
{
1515
keyValues = new(StringComparer.Ordinal);
@@ -30,56 +30,60 @@ public AppLinkEntry()
3030
/// <summary>Bindable property for <see cref="IsLinkActive"/>.</summary>
3131
public static readonly BindableProperty IsLinkActiveProperty = BindableProperty.Create(nameof(IsLinkActive), typeof(bool), typeof(AppLinkEntry), false);
3232

33-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='AppLinkUri']/Docs/*" />
33+
/// <summary>Gets or sets an application-specific URI that uniquely describes content within an app. This is a bindable property.</summary>
3434
public Uri AppLinkUri
3535
{
3636
get { return (Uri)GetValue(AppLinkUriProperty); }
3737
set { SetValue(AppLinkUriProperty, value); }
3838
}
3939

40-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='Description']/Docs/*" />
40+
/// <summary>Gets or sets a description that appears with the item in search results. This is a bindable property.</summary>
4141
public string Description
4242
{
4343
get { return (string)GetValue(DescriptionProperty); }
4444
set { SetValue(DescriptionProperty, value); }
4545
}
4646

47-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='IsLinkActive']/Docs/*" />
47+
/// <summary>Gets or sets a value that tells whether the item that is identified by the link entry is currently open.</summary>
48+
/// <remarks>Application developers can set this value in <see cref="E:Microsoft.Maui.Controls.Application.PageAppearing"/> and <see cref="E:Microsoft.Maui.Controls.Application.PageDisappearing"/> methods to control whether the app link is shown for indexing or Handoff.</remarks>
4849
public bool IsLinkActive
4950
{
5051
get { return (bool)GetValue(IsLinkActiveProperty); }
5152
set { SetValue(IsLinkActiveProperty, value); }
5253
}
5354

54-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='KeyValues']/Docs/*" />
55+
/// <summary>Gets a dictionary of application-specific key-value pairs.</summary>
56+
/// <remarks>The standard keys are <c>contentType</c>, <c>associatedWebPage</c>, and <c>shouldAddToPublicIndex</c>.</remarks>
5557
public IDictionary<string, string> KeyValues
5658
{
5759
get { return keyValues; }
5860
}
5961

60-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='Thumbnail']/Docs/*" />
62+
/// <summary>Gets or sets a small image that appears with the item in search results. This is a bindable property.</summary>
6163
public ImageSource Thumbnail
6264
{
6365
get { return (ImageSource)GetValue(ThumbnailProperty); }
6466
set { SetValue(ThumbnailProperty, value); }
6567
}
6668

67-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='Title']/Docs/*" />
69+
/// <summary>Gets or sets the title of the item. This is a bindable property.</summary>
6870
public string Title
6971
{
7072
get { return (string)GetValue(TitleProperty); }
7173
set { SetValue(TitleProperty, value); }
7274
}
7375

74-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='FromUri']/Docs/*" />
76+
/// <summary>Creates and returns a new <see cref="T:Microsoft.Maui.Controls.AppLinkEntry"/> for the specified <paramref name="uri"/>.</summary>
77+
/// <param name="uri">A URI that can be parsed by the target appliction to recreate a specific state.</param>
7578
public static AppLinkEntry FromUri(Uri uri)
7679
{
7780
var appEntry = new AppLinkEntry();
7881
appEntry.AppLinkUri = uri;
7982
return appEntry;
8083
}
8184

82-
/// <include file="../../docs/Microsoft.Maui.Controls/AppLinkEntry.xml" path="//Member[@MemberName='ToString']/Docs/*" />
85+
/// <summary>Returns a string representation of this <see cref="T:Microsoft.Maui.Controls.AppLinkEntry"/>.</summary>
86+
/// <returns>A string representation of this <see cref="T:Microsoft.Maui.Controls.AppLinkEntry"/>.</returns>
8387
public override string ToString()
8488
{
8589
return AppLinkUri.ToString();

src/Controls/src/Core/AppThemeChangedEventArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Microsoft.Maui.Controls
77
/// <include file="../../docs/Microsoft.Maui.Controls/AppThemeChangedEventArgs.xml" path="Type[@FullName='Microsoft.Maui.Controls.AppThemeChangedEventArgs']/Docs/*" />
88
public class AppThemeChangedEventArgs : EventArgs
99
{
10-
/// <include file="../../docs/Microsoft.Maui.Controls/AppThemeChangedEventArgs.xml" path="//Member[@MemberName='.ctor']/Docs/*" />
10+
/// <param name="appTheme">To be added.</param>
1111
public AppThemeChangedEventArgs(AppTheme appTheme) =>
1212
RequestedTheme = appTheme;
1313

src/Controls/src/Core/AutomationProperties.cs

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Microsoft.Maui.Controls
55
{
6-
/// <include file="../../docs/Microsoft.Maui.Controls/AutomationProperties.xml" path="Type[@FullName='Microsoft.Maui.Controls.AutomationProperties']/Docs/*" />
6+
/// <summary>Contains both abbreviated and detailed UI information that is supplied to accessibility services.</summary>
77
public class AutomationProperties
88
{
99
/// <summary>Bindable property for <c>HelpText</c>.</summary>
@@ -24,15 +24,18 @@ public class AutomationProperties
2424
[Obsolete("Use SemanticProperties.Description instead. See the conceptual docs about accessibility for more information.")]
2525
public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(AutomationProperties), default(string));
2626

27-
/// <include file="../../docs/Microsoft.Maui.Controls/AutomationProperties.xml" path="//Member[@MemberName='GetHelpText']/Docs/*" />
27+
/// <summary>Returns the help text, if any, for the bindable object.</summary>
28+
/// <param name="bindable">The bindable object whose help text to get.</param>
2829
public static string GetHelpText(BindableObject bindable)
2930
{
3031
#pragma warning disable CS0618 // Type or member is obsolete
3132
return (string)bindable.GetValue(HelpTextProperty);
3233
#pragma warning restore CS0618 // Type or member is obsolete
3334
}
3435

35-
/// <include file="../../docs/Microsoft.Maui.Controls/AutomationProperties.xml" path="//Member[@MemberName='GetIsInAccessibleTree']/Docs/*" />
36+
/// <summary>Gets a nullable Boolean value that tells whether the bindable object is available to the accessibility system.</summary>
37+
/// <param name="bindable">The bindable object whose status to check.</param>
38+
/// <returns><see langword="true"/> if <paramref name="bindable"/> is available to the accessibility system. <see langword="false"/> or <see langword="null"/> if it is not.</returns>
3639
public static bool? GetIsInAccessibleTree(BindableObject bindable)
3740
{
3841
return (bool?)bindable.GetValue(IsInAccessibleTreeProperty);
@@ -43,7 +46,9 @@ public static string GetHelpText(BindableObject bindable)
4346
return (bool?)bindable.GetValue(ExcludedWithChildrenProperty);
4447
}
4548

46-
/// <include file="../../docs/Microsoft.Maui.Controls/AutomationProperties.xml" path="//Member[@MemberName='GetLabeledBy']/Docs/*" />
49+
/// <summary>Returns the element that labels <paramref name="bindable"/>, if <paramref name="bindable"/> does not label itself and if another element describes it in the UI.</summary>
50+
/// <param name="bindable">The object whose label to find.</param>
51+
/// <returns>The element that labels <paramref name="bindable"/>, if present.</returns>
4752
[System.ComponentModel.TypeConverter(typeof(ReferenceTypeConverter))]
4853
public static VisualElement GetLabeledBy(BindableObject bindable)
4954
{
@@ -52,23 +57,29 @@ public static VisualElement GetLabeledBy(BindableObject bindable)
5257
#pragma warning restore CS0618 // Type or member is obsolete
5358
}
5459

55-
/// <include file="../../docs/Microsoft.Maui.Controls/AutomationProperties.xml" path="//Member[@MemberName='GetName']/Docs/*" />
60+
/// <summary>Returns the short, developer-specified, introductory name of the element, such as "Progress Indicator" or "Button".</summary>
61+
/// <param name="bindable">The object whose name to get.</param>
62+
/// <returns>The short, introdctory name of the element.</returns>
5663
public static string GetName(BindableObject bindable)
5764
{
5865
#pragma warning disable CS0618 // Type or member is obsolete
5966
return (string)bindable.GetValue(NameProperty);
6067
#pragma warning restore CS0618 // Type or member is obsolete
6168
}
6269

63-
/// <include file="../../docs/Microsoft.Maui.Controls/AutomationProperties.xml" path="//Member[@MemberName='SetHelpText']/Docs/*" />
70+
/// <summary>Sets the help text for <paramref name="bindable"/>.</summary>
71+
/// <param name="bindable">The object whose help text to set.</param>
72+
/// <param name="value">The new help text value.</param>
6473
public static void SetHelpText(BindableObject bindable, string value)
6574
{
6675
#pragma warning disable CS0618 // Type or member is obsolete
6776
bindable.SetValue(HelpTextProperty, value);
6877
#pragma warning restore CS0618 // Type or member is obsolete
6978
}
7079

71-
/// <include file="../../docs/Microsoft.Maui.Controls/AutomationProperties.xml" path="//Member[@MemberName='SetIsInAccessibleTree']/Docs/*" />
80+
/// <summary>Sets a Boolean value that tells whether the bindable object is available to the accessibility system.</summary>
81+
/// <param name="bindable">The object ot add or remove from the accessibility system.</param>
82+
/// <param name="value"><see langword="true"/> to make <paramref name="bindable"/> visible to the accessibility system. <see langword="false"/> to remove it from the system.</param>
7283
public static void SetIsInAccessibleTree(BindableObject bindable, bool? value)
7384
{
7485
bindable.SetValue(IsInAccessibleTreeProperty, value);
@@ -79,15 +90,19 @@ public static void SetExcludedWithChildren(BindableObject bindable, bool? value)
7990
bindable.SetValue(ExcludedWithChildrenProperty, value);
8091
}
8192

82-
/// <include file="../../docs/Microsoft.Maui.Controls/AutomationProperties.xml" path="//Member[@MemberName='SetLabeledBy']/Docs/*" />
93+
/// <summary>Sets another element, such as a <see cref="T:Microsoft.Maui.Controls.Label"/> as the label for <paramref name="bindable"/>.</summary>
94+
/// <param name="bindable">The object whose label to set.</param>
95+
/// <param name="value">The visual element that will name <paramref name="bindable"/>, or <see langword="null"/> to make <paramref name="bindable"/> its own label.</param>
8396
public static void SetLabeledBy(BindableObject bindable, VisualElement value)
8497
{
8598
#pragma warning disable CS0618 // Type or member is obsolete
8699
bindable.SetValue(LabeledByProperty, value);
87100
#pragma warning restore CS0618 // Type or member is obsolete
88101
}
89102

90-
/// <include file="../../docs/Microsoft.Maui.Controls/AutomationProperties.xml" path="//Member[@MemberName='SetName']/Docs/*" />
103+
/// <summary>Sets the short, developer-specified, introductory name of the element, such as "Progress Indicator" or "Button".</summary>
104+
/// <param name="bindable">The object whose name to set.</param>
105+
/// <param name="value">The new name.</param>
91106
public static void SetName(BindableObject bindable, string value)
92107
{
93108
#pragma warning disable CS0618 // Type or member is obsolete

src/Controls/src/Core/BackButtonPressedEventArgs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
namespace Microsoft.Maui.Controls
55
{
6-
/// <include file="../../docs/Microsoft.Maui.Controls/BackButtonPressedEventArgs.xml" path="Type[@FullName='Microsoft.Maui.Controls.BackButtonPressedEventArgs']/Docs/*" />
6+
/// <summary>Internal use only. Contains arguments for the event that is raised when a back button is pressed.</summary>
77
public class BackButtonPressedEventArgs : EventArgs
88
{
9-
/// <include file="../../docs/Microsoft.Maui.Controls/BackButtonPressedEventArgs.xml" path="//Member[@MemberName='Handled']/Docs/*" />
9+
/// <summary>Internal use only. Gets or sets a value that indicates whether the back button event has already been handled.</summary>
1010
public bool Handled { get; set; }
1111
}
1212
}

0 commit comments

Comments
 (0)