Exemplo n.º 1
0
 private void dragger_MouseUp(object sender, MouseButtonEventArgs e)
 {
     if (e.OriginalSource.GetType() == typeof(Image))
     {
         Dragger.Source = _imgCrosshair;
         Dragger.Cursor = Cursors.Cross;
         _isMove        = false;
         Dragger.ReleaseMouseCapture();
         CrosshairDragged?.Invoke(this, e);
     }
 }
Exemplo n.º 2
0
        private void Crosshair_MouseUp(object sender, MouseButtonEventArgs e)
        {
            var source = e.OriginalSource as Ellipse;

            if (source != null)
            {
                source.ReleaseMouseCapture();
                source.Cursor      = null;
                Dragger.Visibility = System.Windows.Visibility.Visible;
                isMove             = false;
                CrosshairDragged?.Invoke(this, e);
            }
        }