public void ScrollIntoView(object item, ScrollIntoViewAlignment alignment) { var index = IndexFromItem(item); var displayPosition = ConvertIndexToDisplayPosition(index); NativePanel?.ScrollIntoView(displayPosition, alignment); }
public void ScrollIntoView(object item) { if (NativePanel != null) { NativePanel.ScrollIntoView(item); } else if (this.Log().IsEnabled(LogLevel.Warning)) { this.Log().LogWarning($"{nameof(ScrollIntoView)} not supported when using non-virtualizing panels."); } }
public void ScrollIntoView(object item, ScrollIntoViewAlignment alignment) { // Dispatching ScrollIntoView on Android prevents issues where layout/render changes // occuring during scrolling are not always properly picked up by the layouting/rendering engine. Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { var index = IndexFromItem(item); var displayPosition = ConvertIndexToDisplayPosition(index); NativePanel?.ScrollIntoView(displayPosition, alignment); }); }