Hai,
Rectangle rectcrop = new Rectangle();
rectcrop.SetValue(Canvas.LeftProperty, mouseHorizontalPosition);
// take X the value when mouse button down
rectcrop.SetValue(Canvas.TopProperty, mouseVerticalPosition);
// take Y the value when mouse button down
rectcrop.SetValue(Canvas.WidthProperty, (mouseHorizontalPositionup - mouseHorizontalPosition));
// take X the value when mouse button up and minus it
rectcrop.SetValue(Canvas.HeightProperty, (mouseVerticalPositionup - mouseVerticalPosition));
// takeY the value when mouse button up and minus it
rectcrop.SetValue(Rectangle.FillProperty, new SolidColorBrush(Colors.White));
rectcrop.SetValue(Rectangle.OpacityProperty, 0.1);
// add this rectangle to canvas