title: Xamarin.ios CollectionView Delete and Insert Items
body: <p>I am currently developing an iphone app with xamarin in visual studio. I'm a beginner..</p>
  
  <p>I use a CollectionView. This has a list and includes 8 items with different ID's in the CollectionViewSource.cs:</p>
  
  <pre><code>ProductCategoryList.Add (new ProductCategorys () {Categoryid = 1, ProductCategoryName = "testname", ProductCategoryImage = UIImage.FromFile ( "productcat / maincat / testpic.jpg")});
  </code></pre>
  
  <p>Now I would like, if an item is pressed, delete All Items and refill it.
  In the ProductCategoryCollectionDelegate.cs i have:</p>
  
  <pre><code>Public override Boolean ShouldSelectItem (UICollectionView collectionView, NSIndexPath indexPath)
  </code></pre>
  
  <p>For the delete and insert I have found these 2 methods</p>
  
  <pre><code>Public void DeleteItems (NSIndexPath [] indexPaths)
  Public void InsertItems (NSIndexPath [] indexPaths)
  </code></pre>
  
  <p>(The xamarin Documentation is very scarce)</p>
  
  <p>How can I use this 2 metodes to completely empty the list and add new items?</p>
  
  <p>thanks for help</p>