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);
 }