/// <summary> /// 将控件置于 Z 轴顶层 /// </summary> public void BringToFront() { IUIControl parent = this.m_UIParent; if (parent == null) { return; } parent.SuspendLayout(); try { parent.UIControls.Remove(this); parent.UIControls.Add(this); } finally { parent.ResumeLayout(); } }
/// <summary> /// 将控件置于 Z 轴底层 /// </summary> public void SendToBack() { IUIControl parent = this.m_UIParent; if (parent == null) { return; } parent.SuspendLayout(); try { parent.UIControls.Remove(this); parent.UIControls.Insert(0, this); } finally { parent.ResumeLayout(); } }