Пример #1
0
 private void dragger_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (e.OriginalSource.GetType() == typeof(Image))
     {
         //Image image = e.OriginalSource as Image;
         _isMove        = true;
         Dragger.Source = null;
         Dragger.Cursor = _myCursor;
         Dragger.CaptureMouse();
     }
 }
Пример #2
0
 private void dragger_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (e.OriginalSource.GetType() == typeof(Image))
     {
         //Image image = e.OriginalSource as Image;
         _isMove        = true;
         Dragger.Source = null;
         if (_myCursor == null)
         {
             // use file path to avoid System.IO.IOException caused by GetTempFileName in System.Windows.Input.Cursor.LoadFromStream
             _myCursor = new Cursor(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets\\crosshair.cur"));
         }
         Dragger.Cursor = _myCursor;
         Dragger.CaptureMouse();
     }
 }