Пример #1
0
        /// <summary>
        /// Displays the cursor at the provided position
        /// </summary>
        /// <param name="type">Cursor type</param>
        /// <param name="position">Position to render</param>
        public void Show(MoreCursors type, Point position)
        {
            this.SetValue(Canvas.LeftProperty, position.X - (double.IsNaN(Width) ? 0 : Width * 0.5));
            this.SetValue(Canvas.TopProperty, position.Y - (double.IsNaN(Height) ? 0 : Height * 0.5));

            Type = type;
        }
Пример #2
0
 /// <summary>
 /// Hides the cursor
 /// </summary>
 public void Hide()
 {
     Type = MoreCursors.None;
 }