Esempio n. 1
0
 protected override UIElementCollection CreateUIElementCollection(FrameworkElement logicalParent)
 {
     //ObservableUIElementCollection collec = new ObservableUIElementCollection(this, logicalParent);
     collec = new ObservableUIElementCollection(this, logicalParent);
     collec.CollectionChanged += new NotifyCollectionChangedEventHandler(modificationHandler);
     return(collec);
     //return new ObservableUIElementCollection(this, logicalParent);
 }
    protected override UIElementCollection CreateUIElementCollection(FrameworkElement logicalParent)
    {
        var oldObservableCollection = InternalChildren as INotifyCollectionChanged;

        if (oldObservableCollection != null)
        {
            oldObservableCollection.CollectionChanged -= OnChildrenChanged;
        }
        var collection = new ObservableUIElementCollection(this, logicalParent);

        collection.CollectionChanged += OnChildrenChanged;
        return(collection);
    }
Esempio n. 3
0
 public SplitPanel()
 {
     Items = new ObservableUIElementCollection();
     Items.CollectionChanged += Items_CollectionChanged;
 }