コード例 #1
0
 private void ElementOnMouseLeftButtonDown(object sender, MouseButtonEventArgs mouseButtonEventArgs)
 {
     mouseDownPoint = mouseButtonEventArgs.GetPosition(element);
     adorner = new RubberBandAdorner(element, new Rectangle { Stroke = stroke, StrokeDashArray = strokeDashArray, Fill = fill });
     element.MouseMove += ElementOnMouseMove;
     element.MouseLeftButtonUp += ElementOnMouseLeftButtonUp;
     element.CaptureMouse();
     adornerLayer.Add(adorner);
 }
コード例 #2
0
 private void ElementOnMouseLeftButtonDown(object sender, MouseButtonEventArgs mouseButtonEventArgs)
 {
     mouseDownPoint = mouseButtonEventArgs.GetPosition(element);
     adorner        = new RubberBandAdorner(element, new Rectangle {
         Stroke = stroke, StrokeDashArray = strokeDashArray, Fill = fill
     });
     element.MouseMove         += ElementOnMouseMove;
     element.MouseLeftButtonUp += ElementOnMouseLeftButtonUp;
     element.CaptureMouse();
     adornerLayer.Add(adorner);
 }