diff --git a/src/Avalonia.Base/Animation/Animation.cs b/src/Avalonia.Base/Animation/Animation.cs index 7e139c5ae6..0391280ede 100644 --- a/src/Avalonia.Base/Animation/Animation.cs +++ b/src/Avalonia.Base/Animation/Animation.cs @@ -271,7 +271,7 @@ namespace Avalonia.Animation IDisposable IAnimation.Apply(Animatable control, IClock? clock, IObservable match, Action? onComplete) => Apply(control, clock, match, onComplete); - /// + /// internal IDisposable Apply(Animatable control, IClock? clock, IObservable match, Action? onComplete) { var (animators, subscriptions) = InterpretKeyframes(control); @@ -320,7 +320,7 @@ namespace Avalonia.Animation public Task RunAsync(Animatable control, CancellationToken cancellationToken = default) => RunAsync(control, null, cancellationToken); - /// + /// internal Task RunAsync(Animatable control, IClock? clock) { return RunAsync(control, clock, default); @@ -329,7 +329,7 @@ namespace Avalonia.Animation Task IAnimation.RunAsync(Animatable control, IClock? clock, CancellationToken cancellationToken) => RunAsync(control, clock, cancellationToken); - /// + /// internal Task RunAsync(Animatable control, IClock? clock, CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) diff --git a/src/Avalonia.Base/Animation/TransitionBase.cs b/src/Avalonia.Base/Animation/TransitionBase.cs index 86d997a7d0..864cd1bf7a 100644 --- a/src/Avalonia.Base/Animation/TransitionBase.cs +++ b/src/Avalonia.Base/Animation/TransitionBase.cs @@ -78,7 +78,7 @@ namespace Avalonia.Animation set { SetAndRaise(EasingProperty, ref _easing, value); } } - /// + /// [DisallowNull] public AvaloniaProperty? Property { diff --git a/src/Avalonia.Base/Collections/AvaloniaDictionary.cs b/src/Avalonia.Base/Collections/AvaloniaDictionary.cs index 12219c599f..47f790ded5 100644 --- a/src/Avalonia.Base/Collections/AvaloniaDictionary.cs +++ b/src/Avalonia.Base/Collections/AvaloniaDictionary.cs @@ -59,10 +59,10 @@ namespace Avalonia.Collections /// public event PropertyChangedEventHandler? PropertyChanged; - /// + /// public int Count => _inner.Count; - /// + /// public bool IsReadOnly => false; /// @@ -131,7 +131,7 @@ namespace Avalonia.Collections NotifyAdd(key, value); } - /// + /// public void Clear() { var old = _inner; @@ -152,7 +152,7 @@ namespace Avalonia.Collections } } - /// + /// public bool ContainsKey(TKey key) => _inner.ContainsKey(key); /// @@ -189,8 +189,9 @@ namespace Avalonia.Collections } } - /// + /// public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value) => _inner.TryGetValue(key, out value); + /// IEnumerator IEnumerable.GetEnumerator() => _inner.GetEnumerator(); diff --git a/src/Avalonia.Base/Layout/Layoutable.cs b/src/Avalonia.Base/Layout/Layoutable.cs index 8adb3fb67e..277548b07e 100644 --- a/src/Avalonia.Base/Layout/Layoutable.cs +++ b/src/Avalonia.Base/Layout/Layoutable.cs @@ -470,7 +470,10 @@ namespace Avalonia.Layout } } - /// + /// + /// Called when a child control's desired size changes. + /// + /// The child control. internal void ChildDesiredSizeChanged(Layoutable control) { if (!_measuring) diff --git a/src/Avalonia.Base/Media/ExperimentalAcrylicMaterial.cs b/src/Avalonia.Base/Media/ExperimentalAcrylicMaterial.cs index 22d5a29870..24b80d01ea 100644 --- a/src/Avalonia.Base/Media/ExperimentalAcrylicMaterial.cs +++ b/src/Avalonia.Base/Media/ExperimentalAcrylicMaterial.cs @@ -78,7 +78,9 @@ namespace Avalonia.Media public static readonly StyledProperty FallbackColorProperty = AvaloniaProperty.Register(nameof(FallbackColor)); - /// + /// + /// Raised when any of the material's visual properties change. + /// public event EventHandler? Invalidated; /// @@ -110,7 +112,7 @@ namespace Avalonia.Media /// /// Gets or Sets the Fallback Color. - /// This is used on rendering plaforms that dont support acrylic. + /// This is used on rendering platforms that don't support acrylic. /// public Color FallbackColor { diff --git a/src/Avalonia.Base/Media/GradientBrush.cs b/src/Avalonia.Base/Media/GradientBrush.cs index 1c949c8f56..5da6a81856 100644 --- a/src/Avalonia.Base/Media/GradientBrush.cs +++ b/src/Avalonia.Base/Media/GradientBrush.cs @@ -49,7 +49,7 @@ namespace Avalonia.Media set { SetValue(SpreadMethodProperty, value); } } - /// + /// [Content] public GradientStops GradientStops { diff --git a/src/Avalonia.Base/Threading/Dispatcher.Invoke.cs b/src/Avalonia.Base/Threading/Dispatcher.Invoke.cs index afee481252..fbd96ed7d8 100644 --- a/src/Avalonia.Base/Threading/Dispatcher.Invoke.cs +++ b/src/Avalonia.Base/Threading/Dispatcher.Invoke.cs @@ -541,13 +541,6 @@ public partial class Dispatcher return result; } - /// - public void Post(Action action, DispatcherPriority priority = default) - { - _ = action ?? throw new ArgumentNullException(nameof(action)); - InvokeAsyncImpl(new DispatcherOperation(this, priority, action, true), CancellationToken.None); - } - /// /// Executes the specified Func<Task> asynchronously on the /// thread that the Dispatcher was created on @@ -615,6 +608,17 @@ public partial class Dispatcher return InvokeAsync>(action, priority).GetTask().Unwrap(); } + /// + /// Posts an action that will be invoked on the dispatcher thread. + /// + /// The method. + /// The priority with which to invoke the method. + public void Post(Action action, DispatcherPriority priority = default) + { + _ = action ?? throw new ArgumentNullException(nameof(action)); + InvokeAsyncImpl(new DispatcherOperation(this, priority, action, true), CancellationToken.None); + } + /// /// Posts an action that will be invoked on the dispatcher thread. /// diff --git a/src/Avalonia.Controls/ListBox.cs b/src/Avalonia.Controls/ListBox.cs index 2f71bfb0bb..9ef4b25c53 100644 --- a/src/Avalonia.Controls/ListBox.cs +++ b/src/Avalonia.Controls/ListBox.cs @@ -77,14 +77,14 @@ namespace Avalonia.Controls private set => SetAndRaise(ScrollProperty, ref _scroll, value); } - /// + /// public new IList? SelectedItems { get => base.SelectedItems; set => base.SelectedItems = value; } - /// + /// public new ISelectionModel Selection { get => base.Selection; diff --git a/src/Avalonia.Controls/Menu.cs b/src/Avalonia.Controls/Menu.cs index 56137287a0..7ee2b27a52 100644 --- a/src/Avalonia.Controls/Menu.cs +++ b/src/Avalonia.Controls/Menu.cs @@ -43,7 +43,7 @@ namespace Avalonia.Controls AccessKeyHandler.AccessKeyPressedEvent.AddClassHandler(OnAccessKeyPressed); } - /// + /// public override void Close() { if (!IsOpen) @@ -66,7 +66,7 @@ namespace Avalonia.Controls }); } - /// + /// public override void Open() { if (IsOpen)