public override void OnLostFocus() { if ( this.expandedBox.IsVisible ) this.Retract(); base.OnLostFocus(); }