Beispiel #1
0
        private GridItemCollectionChangedEventArgs GetGridItemCollectionChangedEventArgs(IEnumerable <TileGridItem> items)
        {
            GridItemCollectionChangedEventArgs e = new GridItemCollectionChangedEventArgs();

            e.ChangedItems = items;
            return(e);
        }
Beispiel #2
0
 private void items_ItemsAdded(object sender, GridItemCollectionChangedEventArgs e)
 {
     foreach (TileGridItem item in e.ChangedItems)
     {
         item.PropertyChanged += new PropertyChangedEventHandler(item_PropertyChanged);
         this.rowCount         = this.items.Max(x => x.Row) + 1;
     }
     UpdateControl();
 }
Beispiel #3
0
 private void items_CollectionCleared(object sender, GridItemCollectionChangedEventArgs e)
 {
     foreach (TileGridItem item in e.ChangedItems)
     {
         this.selectedItems.Clear();
         item.PropertyChanged -= new PropertyChangedEventHandler(item_PropertyChanged);
         this.rowCount         = 0;
     }
     UpdateControl();
 }
Beispiel #4
0
 private void items_ItemsRemoved(object sender, GridItemCollectionChangedEventArgs e)
 {
     foreach (TileGridItem item in e.ChangedItems)
     {
         if (this.selectedItems.ContainsKey(item.Row))
         {
             this.selectedItems.Remove(item.Row);
         }
         item.PropertyChanged -= new PropertyChangedEventHandler(item_PropertyChanged);
         this.rowCount         = this.items.Max(x => x.Row) + 1;
     }
     UpdateControl();
 }