コード例 #1
0
 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);
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 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);
         }
     }
 }
コード例 #4
0
 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);
         }
     }
 }
コード例 #5
0
 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);
         }
     }
 }
コード例 #6
0
ファイル: NativeListViewBase.iOS.cs プロジェクト: zzyzy/uno
 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);
             }
         }
     }
 }
コード例 #7
0
 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);
             }
         }
     }
 }