void WLControls_CollectionChange(GMCollectionChangeArgs e) { if (e.Action == GMCollectionChangeAction.AfterInsert) { WLControlBase ctl = e.Value as WLControlBase; if (ctl != null) listChildControls.Add(ctl); } else if (e.Action == GMCollectionChangeAction.AfterRemove) { WLControlBase ctl = e.Value as WLControlBase; if (ctl != null) listChildControls.Remove(ctl); } else if (e.Action == GMCollectionChangeAction.AfterClear) listChildControls.Clear(); }
private void Items_CollectionChange(GMCollectionChangeArgs e) { if (e.Action == GMCollectionChangeAction.AfterInsert) DoWhenInsertItem(e.Index, e.Value); else if (e.Action == GMCollectionChangeAction.AfterRemove) DoWhenRemoveItem(e.Index, e.Value); else if (e.Action == GMCollectionChangeAction.AfterClear) DoWhenClearItem(); }