/// <summary>
        /// Starts dragging, and invokes the StartMoving event.
        /// </summary>
        /// <param name="args">Mouse event arguments.</param>
        protected override void OnMouseDown(MouseEventArgs args)
        {
            if (args.Button == MouseButtons.Left)
            {
                this.isDragging   = true;
                this.lastLocation = args.Position;

                if (StartMoving != null)
                {
                    StartMoving.Invoke(this);
                }
            }
        }
Beispiel #2
0
 private void OnStartMoving()
 {
     StartMoving?.Invoke(this, new EventArgs());
 }
Beispiel #3
0
 protected virtual void OnStartMoving(IntPtr handle)
 {
     System.Diagnostics.Debug.WriteLine($"Start moving");
     _state = State.Moving;
     StartMoving?.Invoke(this, handle);
 }