예제 #1
0
        public void ScrollIntoView(object item, ScrollIntoViewAlignment alignment)
        {
            var index           = IndexFromItem(item);
            var displayPosition = ConvertIndexToDisplayPosition(index);

            NativePanel?.ScrollIntoView(displayPosition, alignment);
        }
예제 #2
0
 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.");
     }
 }
예제 #3
0
 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);
     });
 }