Browse Source

Move ScrollInfoView into ItemsControl. (#14538)

Fixes #14524
pull/14787/head
Steven Kirk 2 years ago
committed by Max Katz
parent
commit
3d5014400c
  1. 12
      src/Avalonia.Controls/ItemsControl.cs
  2. 12
      src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

12
src/Avalonia.Controls/ItemsControl.cs

@ -298,6 +298,18 @@ namespace Avalonia.Controls
/// </summary>
public IEnumerable<Control> GetRealizedContainers() => Presenter?.GetRealizedContainers() ?? Array.Empty<Control>();
/// <summary>
/// Scrolls the specified item into view.
/// </summary>
/// <param name="index">The index of the item.</param>
public void ScrollIntoView(int index) => Presenter?.ScrollIntoView(index);
/// <summary>
/// Scrolls the specified item into view.
/// </summary>
/// <param name="item">The item.</param>
public void ScrollIntoView(object item) => ScrollIntoView(ItemsView.IndexOf(item));
/// <summary>
/// Returns the <see cref="ItemsControl"/> that owns the specified container control.
/// </summary>

12
src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

@ -409,18 +409,6 @@ namespace Avalonia.Controls.Primitives
EndUpdating();
}
/// <summary>
/// Scrolls the specified item into view.
/// </summary>
/// <param name="index">The index of the item.</param>
public void ScrollIntoView(int index) => Presenter?.ScrollIntoView(index);
/// <summary>
/// Scrolls the specified item into view.
/// </summary>
/// <param name="item">The item.</param>
public void ScrollIntoView(object item) => ScrollIntoView(ItemsView.IndexOf(item));
/// <summary>
/// Gets the value of the <see cref="IsSelectedProperty"/> on the specified control.
/// </summary>

Loading…
Cancel
Save