Пример #1
0
 /// <summary>
 /// CollectionChanged by the child in section
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">The ${ParameterType} instance containing the event data.</param>
 public void OnSectionCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.NewItems != null)
     {
         e.NewItems.Cast <Cell>().ForEach(cell => cell.Parent = this);
     }
     SectionCollectionChanged?.Invoke(sender, e);
 }
Пример #2
0
        void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            var oldCells = e.OldItems?.OfType <CellBase>() ?? Enumerable.Empty <CellBase>();

            foreach (var oldCell in oldCells)
            {
                oldCell.PropertyChanged -= OnItemPropertyChanged;
            }

            var newCells = e.NewItems?.OfType <CellBase>() ?? Enumerable.Empty <CellBase>();

            foreach (var newCell in newCells)
            {
                newCell.PropertyChanged += OnItemPropertyChanged;
            }

            SectionCollectionChanged?.Invoke(this, e);
        }
Пример #3
0
 private void ChildCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
 {
     SectionCollectionChanged?.Invoke(this, EventArgs.Empty);
 }
 void ChildCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
 {
     SectionCollectionChanged?.Invoke(sender, notifyCollectionChangedEventArgs);
 }
Пример #5
0
 void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     SectionCollectionChanged?.Invoke(this, e);
 }