/// <summary> /// DesignRectangle控件鼠标左键按下 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void dr_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { DesignRectangle item = sender as DesignRectangle; mouseVerticalPosition = e.GetPosition(cvsPanle).Y; mouseHorizontalPosition = e.GetPosition(cvsPanle).X; isMouseCaptured = true; isMoveByDesignRectangle = false; item.CaptureMouse(); e.Handled = true; line_Top.Visibility = System.Windows.Visibility.Visible; line_Left.Visibility = System.Windows.Visibility.Visible; }