public MouseLeave ( |
||
e | An EventArgs that contains the event data. | |
리턴 | void |
public override void MouseLeave(EventArgs e)
{
Debug.Assert(e != null);
// Validate incoming reference
if (e == null) throw new ArgumentNullException("e");
if (!_ribbon.InDesignMode)
{
// Only interested if the application window we are inside is active or a docking floating window is active
if (_active || (CommonHelper.ActiveFloatingWindow != null))
{
// If there is an active element
if (_activeGroup != null)
{
_activeGroup.PerformNeedPaint(false, _activeGroup.ClientRectangle);
_activeGroup.Tracking = false;
_activeGroup = null;
}
}
}
// Remember to call base class for standard mouse processing
base.MouseLeave(e);
}
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing) { // Ensure the manager believes the mouse has left the area ViewRibbonManager.MouseLeave(EventArgs.Empty); // If this group is being dismissed with key tips showing if (_ribbon.InKeyboardMode && _ribbon.KeyTipMode == KeyTipMode.PopupMinimized) { // Revert back to key tips for selected tab _ribbon.KeyTipMode = KeyTipMode.Root; _ribbon.SetKeyTips(_ribbon.GenerateKeyTipsAtTopLevel(), KeyTipMode.Root); } // Remove the collection of children elements, so they are not disposed, // disposing them would cause the ones that have real Win32 controls to // also dispose and we do not want that! if (ViewManager != null) { ViewManager.ActiveView = null; ViewManager.Root = new ViewLayoutNull(); } // Remove all child controls so they do not become disposed for (int i = Controls.Count - 1; i >= 0; i--) { Controls.RemoveAt(0); } } base.Dispose(disposing); }