private void child_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (!IsMoveRectangle) { ZoomGrid.ReleaseMouseCapture(); ZoomCanvas.Cursor = Cursors.Arrow; } }
/// <summary> /// Zooming support customization. /// </summary> private void SampleCustomization() { //Wiring the grid to ZoomGrid. zoom = new ZoomGrid(this.gridControl1); //Enabling the Zooming functionality for cell level. ZoomGrid.ZoomGridControlCell = true; this.gridControl1.ColWidths.ResizeToFit(GridRangeInfo.Table()); //tab key navigation set as false to move the next control this.gridControl1.WantTabKey = false; }
private void child_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (!IsMoveRectangle) { if (CtrlDown) { Point clickPoint = (Point)e.GetPosition(ZoomGrid); //CurrentRectangle.Visibility = Visibility.Visible; //CurrentRectangle.Margin = new Thickness(clickPoint.X, clickPoint.Y, 0, 0); } else { var tt = GetTranslateTransform(ZoomGrid); start = e.GetPosition(ZoomCanvas); origin = new Point(tt.X, tt.Y); ZoomCanvas.Cursor = Cursors.Hand; ZoomGrid.CaptureMouse(); } } }