/// <summary> /// Handler for tab selection. /// </summary> /// <param name="control">Event source (TabButton).</param> internal virtual void OnTabPressed(Base control) { TabButton button = control as TabButton; if (null == button) { return; } Base page = button.Page; if (null == page) { return; } if (m_CurrentButton == button) { return; } if (null != m_CurrentButton) { Base page2 = m_CurrentButton.Page; if (page2 != null) { page2.IsHidden = true; } m_CurrentButton.Redraw(); m_CurrentButton = null; } m_CurrentButton = button; page.IsHidden = false; m_TabStrip.Invalidate(); Invalidate(); }
/// <summary> /// Handler for tab selection. /// </summary> /// <param name="control">Event source (TabButton).</param> internal virtual void OnTabPressed(ControlBase control, EventArgs args) { TabButton button = control as TabButton; if (null == button) { return; } ControlBase page = button.Page; if (null == page) { return; } if (currentButton == button) { return; } if (null != currentButton) { ControlBase page2 = currentButton.Page; if (page2 != null) { page2.IsHidden = true; } currentButton.Redraw(); currentButton = null; } currentButton = button; page.IsHidden = false; tabStrip.Invalidate(); Invalidate(); }
/// <summary> /// Handler for tab selection. /// </summary> /// <param name="control">Event source (TabButton).</param> internal virtual void OnTabPressed(ControlBase control, EventArgs args) { TabButton button = control as TabButton; if (null == button) { return; } ControlBase page = button.Page; if (null == page) { return; } if (m_CurrentButton == button) { return; } if (null != m_CurrentButton) { ControlBase page2 = m_CurrentButton.Page; if (page2 != null) { page2.IsHidden = true; } m_CurrentButton.Redraw(); m_CurrentButton = null; } m_CurrentButton = button; page.IsHidden = false; }