protected override void OnDoubleClick(AbsoluteMouseEventArgs e) { base.OnDoubleClick(e); ResizeMode resizeMode = GetResizeMode(e.Location); if ((resizeMode & ResizeMode.Right) != 0) { AutoWidth(); } if ((resizeMode & ResizeMode.Bottom) != 0) { AutoHeight(); } }
internal sealed override bool DoubleClicked(AbsoluteMouseEventArgs e) { bool doubleClicked = Contains(e.Location); if (e.Button == MouseButtons.Left) { doubleClicked |= (IsSelected && GetResizeMode(e.Location) != ResizeMode.None); } if (doubleClicked) { OnDoubleClick(e); } return(doubleClicked); }
internal sealed override bool MousePressed(AbsoluteMouseEventArgs e) { bool pressed = Contains(e.Location); if (e.Button == MouseButtons.Left) { pressed |= (IsSelected && GetResizeMode(e.Location) != ResizeMode.None); } if (pressed) { OnMouseDown(e); } return(pressed); }
protected override void OnMouseMove(AbsoluteMouseEventArgs e) { base.OnMouseMove(e); if (IsResizing) { PerformResize(e.Location); } else if (IsMousePressed && e.Button == MouseButtons.Left) { Size offset = new Size( (int)(e.X - mouseDownLocation.X), (int)(e.Y - mouseDownLocation.Y)); OnDragging(new MoveEventArgs(offset)); } }
protected override void OnMouseUp(AbsoluteMouseEventArgs e) { base.OnMouseUp(e); resizeMode = ResizeMode.None; }
protected override void OnMouseDown(AbsoluteMouseEventArgs e) { base.OnMouseDown(e); resizeMode = GetResizeMode(e.Location); }
internal abstract bool DoubleClicked(AbsoluteMouseEventArgs e);
internal abstract bool MouseUpped(AbsoluteMouseEventArgs e);
internal abstract bool MousePressed(AbsoluteMouseEventArgs e);