public MainPage()
{
this.InitializeComponent();
this.PointerMoved += MainPage_PointerMoved;
}
private void MainPage_PointerMoved(object sender, PointerRoutedEventArgs e)
{
var point = e.GetCurrentPoint(this.dataGrid);
var p = this.dataGrid.GetVisualContainer().ScrollOwner.TransformToVisual(dataGrid).TransformPoint(point.Position);
var isInDataGrid = this.dataGrid.GetVisualContainer().PointToCellRowColumnIndex(p, false);
if (isInDataGrid.IsEmpty)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 0);
}
else
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 0);
} |
public MainPage()
{
this.InitializeComponent();
this.PointerMoved += MainPage_PointerMoved;
}
private void MainPage_PointerMoved(object sender, PointerRoutedEventArgs e)
{
var point = e.GetCurrentPoint(this.dataGrid);
var p = this.dataGrid.GetVisualContainer().ScrollOwner.TransformToVisual(dataGrid).TransformPoint(point.Position);
var isInDataGrid = this.dataGrid.GetVisualContainer().PointToCellRowColumnIndex(p, false);
if (isInDataGrid.IsEmpty)
{
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 0);
}
else
Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 0);
} |