ComponentFactory.Krypton.Toolkit.ViewManager.MouseDown C# (CSharp) Method

MouseDown() public method

Perform mouse down processing.
public MouseDown ( MouseEventArgs e, Point rawPt ) : void
e MouseEventArgs A MouseEventArgs that contains the event data.
rawPt Point The actual point provided from the windows message.
return void
        public virtual void MouseDown(MouseEventArgs e, Point rawPt)
        {
            Debug.Assert(e != null);

            // Validate incoming reference
            if (e == null) throw new ArgumentNullException("e");

            Point pt = new Point(e.X, e.Y);

            // Set the correct active view from the point
            UpdateViewFromPoint(_control, pt);

            // Tell current view of mouse down
            if (ActiveView != null)
                MouseCaptured = ActiveView.MouseDown(rawPt, e.Button);

            // Generate event to indicate the view manager has processed a mouse down
            PerformMouseDownProcessed(e);
        }

Usage Example

Beispiel #1
0
        /// <summary>
        /// Raises the MouseDown event.
        /// </summary>
        /// <param name="e">A MouseEventArgs that contains the event data.</param>
        protected override void OnMouseDown(MouseEventArgs e)
        {
            // Cannot process a message for a disposed control
            if (!IsDisposed)
            {
                // Do we have a manager for processing mouse messages?
                ViewManager?.MouseDown(e, new Point(e.X, e.Y));
            }

            // Do not call base class! Prevent capture of the mouse
        }
All Usage Examples Of ComponentFactory.Krypton.Toolkit.ViewManager::MouseDown