diff --git a/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs b/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs index 49c6fdbaaa..15f51822d6 100644 --- a/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs +++ b/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs @@ -178,24 +178,36 @@ namespace Avalonia.Controls.Presenters private set { SetAndRaise(ViewportProperty, ref _viewport, value); } } + /// + /// Gets or sets how scroll gesture reacts to the snap points along the horizontal axis. + /// public SnapPointsType HorizontalSnapPointsType { - get => GetValue(HorizontalSnapPointsTypeProperty); + get => GetValue(HorizontalSnapPointsTypeProperty); set => SetValue(HorizontalSnapPointsTypeProperty, value); } + /// + /// Gets or sets how scroll gesture reacts to the snap points along the vertical axis. + /// public SnapPointsType VerticalSnapPointsType { - get => GetValue(VerticalSnapPointsTypeProperty); + get => GetValue(VerticalSnapPointsTypeProperty); set => SetValue(VerticalSnapPointsTypeProperty, value); } + /// + /// Gets or sets how the existing snap points are horizontally aligned versus the initial viewport. + /// public SnapPointsAlignment HorizontalSnapPointsAlignment { - get => GetValue(HorizontalSnapPointsAlignmentProperty); + get => GetValue(HorizontalSnapPointsAlignmentProperty); set => SetValue(HorizontalSnapPointsAlignmentProperty, value); } + /// + /// Gets or sets how the existing snap points are vertically aligned versus the initial viewport. + /// public SnapPointsAlignment VerticalSnapPointsAlignment { get => GetValue(VerticalSnapPointsAlignmentProperty); diff --git a/src/Avalonia.Controls/ScrollViewer.cs b/src/Avalonia.Controls/ScrollViewer.cs index 215e2dd395..fb40006b4c 100644 --- a/src/Avalonia.Controls/ScrollViewer.cs +++ b/src/Avalonia.Controls/ScrollViewer.cs @@ -449,24 +449,36 @@ namespace Avalonia.Controls private set => SetAndRaise(ScrollBar.IsExpandedProperty, ref _isExpanded, value); } + /// + /// Gets or sets how scroll gesture reacts to the snap points along the horizontal axis. + /// public SnapPointsType HorizontalSnapPointsType { get => GetValue(HorizontalSnapPointsTypeProperty); set => SetValue(HorizontalSnapPointsTypeProperty, value); } + /// + /// Gets or sets how scroll gesture reacts to the snap points along the vertical axis. + /// public SnapPointsType VerticalSnapPointsType { get => GetValue(VerticalSnapPointsTypeProperty); set => SetValue(VerticalSnapPointsTypeProperty, value); } + /// + /// Gets or sets how the existing snap points are horizontally aligned versus the initial viewport. + /// public SnapPointsAlignment HorizontalSnapPointsAlignment { get => GetValue(HorizontalSnapPointsAlignmentProperty); set => SetValue(HorizontalSnapPointsAlignmentProperty, value); } + /// + /// Gets or sets how the existing snap points are vertically aligned versus the initial viewport. + /// public SnapPointsAlignment VerticalSnapPointsAlignment { get => GetValue(VerticalSnapPointsAlignmentProperty); diff --git a/src/Avalonia.Controls/StackPanel.cs b/src/Avalonia.Controls/StackPanel.cs index 89afb50b38..b9524a515f 100644 --- a/src/Avalonia.Controls/StackPanel.cs +++ b/src/Avalonia.Controls/StackPanel.cs @@ -85,25 +85,36 @@ namespace Avalonia.Controls set { SetValue(OrientationProperty, value); } } + /// + /// Occurs when the measurements for horizontal snap points change. + /// public event EventHandler? HorizontalSnapPointsChanged { add => AddHandler(HorizontalSnapPointsChangedEvent, value); remove => RemoveHandler(HorizontalSnapPointsChangedEvent, value); } - + /// + /// Occurs when the measurements for vertical snap points change. + /// public event EventHandler? VerticalSnapPointsChanged { add => AddHandler(VerticalSnapPointsChangedEvent, value); remove => RemoveHandler(VerticalSnapPointsChangedEvent, value); } + /// + /// Gets or sets whether the horizontal snap points for the are equidistant from each other. + /// public bool AreHorizontalSnapPointsRegular { get { return GetValue(AreHorizontalSnapPointsRegularProperty); } set { SetValue(AreHorizontalSnapPointsRegularProperty, value); } } + /// + /// Gets or sets whether the vertical snap points for the are equidistant from each other. + /// public bool AreVerticalSnapPointsRegular { get { return GetValue(AreVerticalSnapPointsRegularProperty); }