private void DetermineResizeCursor() { var effectiveResizeDirection = this.DetermineEffectiveResizeDirection(); if (effectiveResizeDirection == GridResizeDirection.Columns) { FrameworkElementExtensions.SetCursor(this, new CoreCursor(CoreCursorType.SizeWestEast, 1)); } else { FrameworkElementExtensions.SetCursor(this, new CoreCursor(CoreCursorType.SizeNorthSouth, 1)); } }
internal void UpdateCursor() { if (_defaultCursor == null) { _defaultCursor = Window.Current.CoreWindow.PointerCursor; } var cursor = FrameworkElementExtensions.GetCursor(_control); if (_isHovering) { if (cursor != null) { Window.Current.CoreWindow.PointerCursor = cursor; } else { Window.Current.CoreWindow.PointerCursor = DefaultCursor; } } }
private static void OnCursorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { FrameworkElementExtensions.SetCursor(d, new CoreCursor((CoreCursorType)e.NewValue, 1)); }