Browse Source

fix center snap alignment

pull/9961/head
Emmanuel Hansen 3 years ago
parent
commit
baab50e94c
  1. 1
      samples/ControlCatalog/Pages/ScrollSnapPage.xaml.cs
  2. 2
      src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs

1
samples/ControlCatalog/Pages/ScrollSnapPage.xaml.cs

@ -50,6 +50,7 @@ namespace ControlCatalog.Pages
public List<SnapPointsType> AvailableSnapPointsType { get; }
public List<SnapPointsAlignment> AvailableSnapPointsAlignment { get; }
}
public class ScrollSnapPage : UserControl
{
public ScrollSnapPage()

2
src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs

@ -869,7 +869,7 @@ namespace Avalonia.Controls.Presenters
if (!_areVerticalSnapPointsRegular)
{
_verticalSnapPoints = scrollSnapPointsInfo.GetIrregularSnapPoints(Layout.Orientation.Vertical, HorizontalSnapPointsAlignment);
_verticalSnapPoints = scrollSnapPointsInfo.GetIrregularSnapPoints(Layout.Orientation.Vertical, VerticalSnapPointsAlignment);
}
else
{

Loading…
Cancel
Save