public virtual void RecreateControls(bool constructor) { Controls.Clear(); Elements.Clear(); Elements.Add(m_closeButton); FocusedControl = null; m_firstUpdateServed = false; }
/// <summary> /// Removes various references and clears event handlers. /// </summary> public virtual void OnRemoving() { if (HasFocus) { Debug.Assert(GetTopMostOwnerScreen().FocusedControl == this); GetTopMostOwnerScreen().FocusedControl = null; } Elements.Clear(); Owner = null; ClearEvents(); }