IsCursorOverNotifyIcon() public static method

Returns true if the cursor is currently over the specified notify icon.
public static IsCursorOverNotifyIcon ( System.Windows.Forms.NotifyIcon notifyicon ) : bool
notifyicon System.Windows.Forms.NotifyIcon The notify icon to test.
return bool
        /// <summary>
        /// Hides the window
        /// </summary>
        private void HideWindow()
        {
            // note if mouse is over the notify icon when hiding the window
            // if it is, we will assume that the user clicked the icon to hide the window
            this.MouseClickToHideNotifyIcon = WindowPositioning.IsCursorOverNotifyIcon(this.NotifyIcon) && WindowPositioning.IsNotificationAreaActive;
            if (this.MouseClickToHideNotifyIcon)
            {
                this.MouseClickToHideNotifyIconPoint = WindowPositioning.GetCursorPosition();
            }

            this.ReleaseHandlers();
            this.Visibility = Visibility.Hidden;
        }