コード例 #1
0
        public void ScrollIntoView(object item, ScrollIntoViewAlignment alignment)
        {
            var index           = IndexFromItem(item);
            var displayPosition = ConvertIndexToDisplayPosition(index);

            NativePanel?.ScrollIntoView(displayPosition, alignment);
        }
コード例 #2
0
ファイル: ListViewBase.iOS.cs プロジェクト: unoplatform/uno
 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);
     });
 }