Using same handlers for multiple objects WPF C#
问题 This is logic for dragging some cropper over image, and it works. But i have multiple images on different windows (and because of that different files) and I want to assign same logic to all of them, but i dont want to copy same code everywhere. Is there any way to do it? private bool isDragging; private Point clickPosition; private void OnMouseMove(object sender, MouseEventArgs e) { if (isDragging) { Point currentPosition = e.GetPosition(this.Parent as UIElement); double xdiff =