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

                if (StartResizing != null)
                {
                    StartResizing.Invoke(this);
                }
            }
        }
示例#2
0
 protected virtual void OnStartResizing(IntPtr handle)
 {
     System.Diagnostics.Debug.WriteLine($"Start resizing");
     _state = State.Resizing;
     StartResizing?.Invoke(this, handle);
 }