Beispiel #1
0
        internal async void SetMouseCursor(CursorType cursorType)
        {
            if (_mouseCursor == null)
            {
                _mouseCursor = new Image();
                _mouseCursor.IsHitTestVisible = false;
                _trackersPanel.Children.Add(_mouseCursor);
            }
            _mouseCursor.Opacity = 1.0;
#if UWP
            Window.Current.CoreWindow.PointerCursor = null;
#endif
            _mouseCursor.Source = await CursorGenerator.GetCursor(cursorType);

            _mouseCursor.SetValue(Canvas.LeftProperty, (double)(MousePosition.X - 32.0));
            _mouseCursor.SetValue(Canvas.TopProperty, (double)(MousePosition.Y - 32.0));
        }
Beispiel #2
0
 async void UpdateMouseCursorType(CursorType cursorType)
 {
     _mouseCursor.Source = await CursorGenerator.GetCursor(cursorType);
 }