protected override void OnUpdated() { base.OnUpdated(); if (parent != null) { parent.RaiseUpdated(); } if (AutoHide) { bool contains_me = parent.ContainsChildSource(this); int count = Count; if (count == 0 && contains_me) { parent.RemoveChildSource(this); } else if (count > 0 && !contains_me) { parent.AddChildSource(this); } } }