diff --git a/src/Controls/src/Core/ActionSheetArguments.cs b/src/Controls/src/Core/ActionSheetArguments.cs index 230d32fe1e5a..3a558dbe98d0 100644 --- a/src/Controls/src/Core/ActionSheetArguments.cs +++ b/src/Controls/src/Core/ActionSheetArguments.cs @@ -44,7 +44,6 @@ public ActionSheetArguments(string title, string cancel, string destruction, IEn /// public string Title { get; private set; } - /// public FlowDirection FlowDirection { get; set; } /// @@ -53,4 +52,4 @@ public void SetResult(string result) Result.TrySetResult(result); } } -} \ No newline at end of file +} diff --git a/src/Controls/src/Core/AlertArguments.cs b/src/Controls/src/Core/AlertArguments.cs index 7126663f6bad..d1e39db871c5 100644 --- a/src/Controls/src/Core/AlertArguments.cs +++ b/src/Controls/src/Core/AlertArguments.cs @@ -36,7 +36,6 @@ public AlertArguments(string title, string message, string accept, string cancel /// public TaskCompletionSource Result { get; } - /// public FlowDirection FlowDirection { get; set; } /// @@ -50,4 +49,4 @@ public void SetResult(bool result) Result.TrySetResult(result); } } -} \ No newline at end of file +} diff --git a/src/Controls/src/Core/Animation.cs b/src/Controls/src/Core/Animation.cs index 0722205bae41..397f5f03e13f 100644 --- a/src/Controls/src/Core/Animation.cs +++ b/src/Controls/src/Core/Animation.cs @@ -2,20 +2,32 @@ using System.Collections; using System.Collections.Generic; using BaseAnimation = Microsoft.Maui.Animations.Animation; + namespace Microsoft.Maui.Controls { - /// + /// + /// Encapsulates an animation, a collection of functions that modify properties over a user-perceptible time period. + /// public class Animation : BaseAnimation { bool _finishedTriggered; - /// + /// + /// Creates a new object with default values. + /// public Animation() { Easing = Easing.Linear; } - /// + /// + /// Creates a new object with the specified parameters. + /// + /// An action that is called with successive animation values. + /// The fraction into the current animation at which to start the animation. + /// The fraction into the current animation at which to end the animation. + /// The easing function to use to transition in, out, or in and out of the animation. + /// An action to call when the animation is finished. public Animation(Action callback, double start = 0.0f, double end = 1.0f, Easing easing = null, Action finished = null) : base(callback, start, end - start, easing, finished) { @@ -23,8 +35,12 @@ public Animation(Action callback, double start = 0.0f, double end = 1.0f Func transform = AnimationExtensions.Interpolate(start, end); Step = f => callback(transform(f)); } - - /// + /// + /// Adds an object to this that begins at and finishes at . + /// + /// The fraction into this animation at which the added child animation will begin animating. + /// The fraction into this animation at which the added child animation will stop animating. + /// The animation to add. public void Add(double beginAt, double finishAt, Animation animation) { if (beginAt < 0 || beginAt > 1) @@ -41,13 +57,25 @@ public void Add(double beginAt, double finishAt, Animation animation) childrenAnimations.Add(animation); } - /// + /// + /// Runs the animation with the supplied parameters. + /// + /// The owning animation that will be animated. + /// The name, or handle, that is used to access and track the animation and its state. + /// The time, in milliseconds, between frames. + /// The number of milliseconds over which to interpolate the animation. + /// The easing function to use to transition in, out, or in and out of the animation. + /// An action to call when the animation is finished. + /// A function that should return true if the animation should continue. public void Commit(IAnimatable owner, string name, uint rate = 16, uint length = 250, Easing easing = null, Action finished = null, Func repeat = null) { owner.Animate(name, this, rate, length, easing, finished, repeat); } - /// + /// + /// Returns a callback that recursively runs the eased animation step on this object and those of its children that have begun and not finished. + /// + /// A callback that recursively runs the eased animation step on this object and those of its children that have begun and not finished. public Action GetCallback() { Action result = f => @@ -78,21 +106,30 @@ public Action GetCallback() internal void ResetChildren() => this.Reset(); - /// public override void Reset() { base.Reset(); _finishedTriggered = false; } - /// + /// + /// Adds an object to this that begins at and finishes at . + /// + /// The fraction into this animation at which the added child animation will begin animating. + /// The fraction into this animation at which the added child animation will stop animating. + /// The animation to add. public Animation Insert(double beginAt, double finishAt, Animation animation) { Add(beginAt, finishAt, animation); return this; } - /// + /// + /// Adds to the children of this object and sets the start and end times of to and , respectively. + /// + /// The animation to add. + /// The fraction into this animation at which the added child animation will begin animating. + /// The fraction into this animation at which the added child animation will stop animating. public Animation WithConcurrent(Animation animation, double beginAt = 0.0f, double finishAt = 1.0f) { animation.StartDelay = beginAt; @@ -101,7 +138,15 @@ public Animation WithConcurrent(Animation animation, double beginAt = 0.0f, doub return this; } - /// + /// + /// Creates a new object with the specified , and adds it to the children of this object. + /// + /// An action that is called with successive animation values. + /// The fraction into the current animation at which to start the animation. + /// The fraction into the current animation at which to end the animation. + /// The easing function to use to transition in, out, or in and out of the animation. + /// The fraction into this animation at which the added child animation will begin animating. + /// The fraction into this animation at which the added child animation will stop animating. public Animation WithConcurrent(Action callback, double start = 0.0f, double end = 1.0f, Easing easing = null, double beginAt = 0.0f, double finishAt = 1.0f) { var child = new Animation(callback, start, end, easing); @@ -111,7 +156,9 @@ public Animation WithConcurrent(Action callback, double start = 0.0f, do return this; } - /// + /// + /// Specifies if this animation is currently enabled. + /// public bool IsEnabled { get diff --git a/src/Controls/src/Core/AnimationExtensions.cs b/src/Controls/src/Core/AnimationExtensions.cs index 117f97e2d6b1..32f814b21319 100644 --- a/src/Controls/src/Core/AnimationExtensions.cs +++ b/src/Controls/src/Core/AnimationExtensions.cs @@ -47,7 +47,6 @@ static AnimationExtensions() s_tweeners = new Dictionary(); } - /// public static int Add(this IAnimationManager animationManager, Action step) { var id = s_currentTweener++; @@ -61,7 +60,6 @@ public static int Add(this IAnimationManager animationManager, Action st animation.Commit(animationManager); return id; } - /// public static int Insert(this IAnimationManager animationManager, Func step) { var id = s_currentTweener++; @@ -75,7 +73,6 @@ public static int Insert(this IAnimationManager animationManager, Func public static void Remove(this IAnimationManager animationManager, int tickerId) { var animation = s_tweeners[tickerId]; diff --git a/src/Controls/src/Core/Application.cs b/src/Controls/src/Core/Application.cs index 47a695f25530..8a5680e7a203 100644 --- a/src/Controls/src/Core/Application.cs +++ b/src/Controls/src/Core/Application.cs @@ -180,7 +180,6 @@ public AppTheme UserAppTheme public AppTheme RequestedTheme => UserAppTheme != AppTheme.Unspecified ? UserAppTheme : PlatformAppTheme; static Color? _accentColor; - /// public static Color? AccentColor { get => _accentColor ??= GetAccentColor(); @@ -385,4 +384,4 @@ protected internal virtual void CleanUp() IReadOnlyList IVisualTreeElement.GetVisualChildren() => this.Windows; } -} \ No newline at end of file +} diff --git a/src/Controls/src/Core/AutomationProperties.cs b/src/Controls/src/Core/AutomationProperties.cs index 251fa613f151..e5efa0b30827 100644 --- a/src/Controls/src/Core/AutomationProperties.cs +++ b/src/Controls/src/Core/AutomationProperties.cs @@ -9,7 +9,6 @@ public class AutomationProperties /// public static readonly BindableProperty IsInAccessibleTreeProperty = BindableProperty.Create("IsInAccessibleTree", typeof(bool?), typeof(AutomationProperties), null); - /// public static readonly BindableProperty ExcludedWithChildrenProperty = BindableProperty.Create("ExcludedWithChildren", typeof(bool?), typeof(AutomationProperties), null); /// @@ -30,7 +29,6 @@ public static string GetHelpText(BindableObject bindable) return (bool?)bindable.GetValue(IsInAccessibleTreeProperty); } - /// public static bool? GetExcludedWithChildren(BindableObject bindable) { return (bool?)bindable.GetValue(ExcludedWithChildrenProperty); @@ -61,7 +59,6 @@ public static void SetIsInAccessibleTree(BindableObject bindable, bool? value) bindable.SetValue(IsInAccessibleTreeProperty, value); } - /// public static void SetExcludedWithChildren(BindableObject bindable, bool? value) { bindable.SetValue(ExcludedWithChildrenProperty, value); diff --git a/src/Controls/src/Core/BindableObjectExtensions.cs b/src/Controls/src/Core/BindableObjectExtensions.cs index 6edd507fc1c6..12c9da451776 100644 --- a/src/Controls/src/Core/BindableObjectExtensions.cs +++ b/src/Controls/src/Core/BindableObjectExtensions.cs @@ -42,7 +42,6 @@ public static void SetBinding(this BindableObject self, BindableProperty targetP self.SetBinding(targetProperty, binding); } - /// public static T GetPropertyIfSet(this BindableObject bindableObject, BindableProperty bindableProperty, T returnIfNotSet) { if (bindableObject == null) @@ -54,7 +53,6 @@ public static T GetPropertyIfSet(this BindableObject bindableObject, Bindable return returnIfNotSet; } - /// public static void SetAppTheme(this BindableObject self, BindableProperty targetProperty, T light, T dark) => self.SetBinding(targetProperty, new AppThemeBinding { Light = light, Dark = dark }); /// diff --git a/src/Controls/src/Core/BindablePropertyConverter.cs b/src/Controls/src/Core/BindablePropertyConverter.cs index 5867278ff79d..b9396053636a 100644 --- a/src/Controls/src/Core/BindablePropertyConverter.cs +++ b/src/Controls/src/Core/BindablePropertyConverter.cs @@ -14,11 +14,9 @@ namespace Microsoft.Maui.Controls [Xaml.ProvideCompiled("Microsoft.Maui.Controls.XamlC.BindablePropertyConverter")] public sealed class BindablePropertyConverter : TypeConverter, IExtendedTypeConverter { - /// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) => sourceType == typeof(string); - /// public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) => true; @@ -74,7 +72,6 @@ object IExtendedTypeConverter.ConvertFromInvariantString(string value, IServiceP throw new XamlParseException($"Can't resolve {value}. Syntax is [[prefix:]Type.]PropertyName.", lineinfo); } - /// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { var strValue = value?.ToString(); @@ -144,7 +141,6 @@ Type FindTypeForVisualState(IProvideParentValues parentValueProvider, IXmlLineIn } - /// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (value is not BindableProperty bp) @@ -152,4 +148,4 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul return $"{bp.DeclaringType.Name}.{bp.PropertyName}"; } } -} \ No newline at end of file +} diff --git a/src/Controls/src/Core/Binding.cs b/src/Controls/src/Core/Binding.cs index 0b6504c3fe65..88ae866bfa99 100644 --- a/src/Controls/src/Core/Binding.cs +++ b/src/Controls/src/Core/Binding.cs @@ -9,7 +9,6 @@ namespace Microsoft.Maui.Controls /// public sealed class Binding : BindingBase { - /// public const string SelfPath = "."; IValueConverter _converter; object _converterParameter; diff --git a/src/Controls/src/Core/BrushTypeConverter.cs b/src/Controls/src/Core/BrushTypeConverter.cs index 2a17821ba747..579d6ac789f9 100644 --- a/src/Controls/src/Core/BrushTypeConverter.cs +++ b/src/Controls/src/Core/BrushTypeConverter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; @@ -28,15 +28,12 @@ public class BrushTypeConverter : TypeConverter readonly ColorTypeConverter _colorTypeConverter = new ColorTypeConverter(); - /// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) => sourceType == typeof(string); - /// public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) => false; - /// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { var strValue = value?.ToString(); @@ -73,7 +70,6 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c } - /// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) => throw new NotSupportedException(); @@ -411,4 +407,4 @@ bool TryParseOffsets(string[] parts, out float[] result) } } } -} \ No newline at end of file +} diff --git a/src/Controls/src/Core/Button.cs b/src/Controls/src/Core/Button.cs index 48d02da0ef3d..323049630144 100644 --- a/src/Controls/src/Core/Button.cs +++ b/src/Controls/src/Core/Button.cs @@ -8,69 +8,107 @@ namespace Microsoft.Maui.Controls { - /// + /// + /// A button that reacts to touch events. + /// public partial class Button : View, IFontElement, ITextElement, IBorderElement, IButtonController, IElementConfiguration