protected virtual void InitializeListView() { OnBeforeSetListViewSource(); _listViewSource = CreateListViewSource(); ListView.Source = _listViewSource; }
public static void ScrollOutHeaderAfterReload( UIScrollView scrollView, nfloat headerHeight, IListViewSource viewSource, bool animated) { var existingKey = GetTimerKey(scrollView); if (viewSource.ItemsSource != null && viewSource.ItemsSource.Cast <object>().Any()) { if (existingKey == null) { var newKey = new WeakReference <UIScrollView>(scrollView); _timers[newKey] = NSTimer.CreateRepeatingScheduledTimer( TimeSpan.MinValue, t => { if (scrollView.ContentSize.Height > headerHeight) { ScrollOutHeader(scrollView, headerHeight, animated); DisposeTimer(newKey); } }); } } else { DisposeTimer(existingKey); } }