Exemple #1
0
 public Category(object key, string text, params Category[] subcategories)
 {
     this.Key       = key;
     this.Content   = (object)text;
     this._children = new CategoryCollection((IEnumerable <Category>)subcategories);
     this._children.CollectionChanged   += new NotifyCollectionChangedEventHandler(this.Subcategories_CollectionChanged);
     this._children.CollectionResetting += new EventHandler(this.Children_CollectionResetting);
 }
Exemple #2
0
 public Category()
 {
     this._children = new CategoryCollection();
     this._children.CollectionChanged   += new NotifyCollectionChangedEventHandler(this.Subcategories_CollectionChanged);
     this._children.CollectionResetting += new EventHandler(this.Children_CollectionResetting);
 }