SidebarLibrary.Menus.MenuControl.OnMouseLeave C# (CSharp) Method

OnMouseLeave() protected method

protected OnMouseLeave ( EventArgs e ) : void
e System.EventArgs
return void
		protected override void OnMouseLeave(EventArgs e)
		{
			_mouseOver = false;

			// If we manually grabbed focus then do not switch
			// selection when the mouse leaves the control area
			if (!_manualFocus)
			{
				if (_trackItem != -1)
				{
					// If an item is selected then do not change tracking item when the
					// mouse leaves the control area, as a popup menu might be showing and
					// so keep the tracking and selection indication visible
					if (_selected == false)
						_trackItem = SwitchTrackingItem(_trackItem, -1);
				}
			}

			base.OnMouseLeave(e);
		}