// Token: 0x06000CD5 RID: 3285 RVA: 0x0002FBCC File Offset: 0x0002DDCC private void OnClear() { if (this.Owner != null) { if (this.Owner.IsInitialized) { EventTrigger.DisconnectAllTriggers(this.Owner); } for (int i = base.Count - 1; i >= 0; i--) { InheritanceContextHelper.RemoveContextFromObject(this.Owner, base[i]); } } }
// Called by GenericCollection.tb when the collection is cleared. // We use this opportunity to pull all the hooks out of the tree. private void OnClear() { // If we don't have an Owner (the Style/Template case), // we don't need to do anything if (Owner != null) { // If the owner is initialized, we need to disconnect all the trigger. if (Owner.IsInitialized) { EventTrigger.DisconnectAllTriggers(Owner); } // We always need to update the inheritance context for (int i = Count - 1; i >= 0; i--) { InheritanceContextHelper.RemoveContextFromObject(Owner, this[i]); } } }