public override void ReloadSections(NSIndexSet sections) { NativeLayout?.NotifyCollectionChange(new CollectionChangedOperation( IndexPath.FromRowSection(0, (int)sections.FirstIndex), (int)sections.Count, NotifyCollectionChangedAction.Replace, CollectionChangedOperation.Element.Group )); base.ReloadSections(sections); }
public void ScrollIntoView(int displayPosition, ScrollIntoViewAlignment alignment) { StopScroll(); if (NativeLayout != null) { NativeLayout.ScrollToPosition(displayPosition, alignment); AwakenScrollBars(); } }
public void Refresh() { CurrentAdapter?.Refresh(); var isScrollResetting = NativeLayout != null && NativeLayout.ContentOffset != 0; NativeLayout?.Refresh(); if (isScrollResetting) { // Raise scroll events since offset has been reset to 0 InvokeOnScroll(); } }
public override void ReloadItems(NSIndexPath[] indexPaths) { if (TryApplyCollectionChange()) { NativeLayout?.NotifyCollectionChange(new CollectionChangedOperation( indexPaths.First().ToIndexPath(), indexPaths.Length, NotifyCollectionChangedAction.Replace, CollectionChangedOperation.Element.Item )); base.ReloadItems(indexPaths); } }
public override void ReloadSections(NSIndexSet sections) { if (TryApplyCollectionChange()) { using (EnableOrDisableAnimations()) { NativeLayout?.NotifyCollectionChange(new CollectionChangedOperation( Uno.UI.IndexPath.FromRowSection(0, (int)sections.FirstIndex), (int)sections.Count, NotifyCollectionChangedAction.Replace, CollectionChangedOperation.Element.Group )); base.ReloadSections(sections); } } }
public override void DeleteSections(NSIndexSet sections) { if (TryApplyCollectionChange()) { NativeLayout?.NotifyCollectionChange(new CollectionChangedOperation( IndexPath.FromRowSection(0, (int)sections.FirstIndex), (int)sections.Count, NotifyCollectionChangedAction.Remove, CollectionChangedOperation.Element.Group )); try { base.DeleteSections(sections); } catch (MonoTouchException e) { this.Log().Error("Error when updating collection", e); } } }
public override void DeleteItems(NSIndexPath[] indexPaths) { if (TryApplyCollectionChange()) { NativeLayout?.NotifyCollectionChange(new CollectionChangedOperation( indexPaths.First().ToIndexPath(), indexPaths.Length, NotifyCollectionChangedAction.Remove, CollectionChangedOperation.Element.Item )); try { base.DeleteItems(indexPaths); } catch (MonoTouchException e) { this.Log().Error("Error when updating collection", e); } } }
public override void InsertItems(NSIndexPath[] indexPaths) { if (TryApplyCollectionChange()) { using (EnableOrDisableAnimations()) { NativeLayout?.NotifyCollectionChange(new CollectionChangedOperation( indexPaths.First().ToIndexPath(), indexPaths.Length, NotifyCollectionChangedAction.Add, CollectionChangedOperation.Element.Item )); try { base.InsertItems(indexPaths); } catch (MonoTouchException e) { this.Log().Error("Error when updating collection", e); } } } }
public override void InsertSections(NSIndexSet sections) { if (TryApplyCollectionChange()) { using (EnableOrDisableAnimations()) { NativeLayout?.NotifyCollectionChange(new CollectionChangedOperation( Uno.UI.IndexPath.FromRowSection(0, (int)sections.FirstIndex), (int)sections.Count, NotifyCollectionChangedAction.Add, CollectionChangedOperation.Element.Group )); try { base.InsertSections(sections); } catch (MonoTouchException e) { this.Log().Error("Error when updating collection", e); } } } }
public override bool CanScrollVertically(int direction) { return(NativeLayout.CanCurrentlyScrollVertically(direction)); }
public override CGSize SizeThatFits(CGSize size) { var result = NativeLayout.SizeThatFits(size); return(result); }
// We override these two methods because the base implementation depends on ComputeScrollOfset, which is not reliable when, eg, items // are inserted/removed out of view. public override bool CanScrollHorizontally(int direction) { return NativeLayout.CanCurrentlyScrollHorizontally(direction); }