private void InvalidateTimer() { if (!base.DesignMode && DoneCreation) { if (_IsAnimated) { ThemeShare.AddAnimationCallback(DoAnimation); } else { ThemeShare.RemoveAnimationCallback(DoAnimation); } } }
protected override void OnHandleDestroyed(EventArgs e) { ThemeShare.RemoveAnimationCallback(DoAnimation); base.OnHandleDestroyed(e); }