private Cursor CursorOverHandlesHighlightActivity(Cursor cursorToSet, float worldXAt, float worldYAt) { if (mResizeHandles.Visible == false) { SideOver = ResizeSide.None; } else { // If the user is already dragging then there's // no need to re-check which side the user is over if (!Cursor.PrimaryDown && !Cursor.PrimaryClick) { SideOver = mResizeHandles.GetSideOver(worldXAt, worldYAt); } } switch (SideOver) { case ResizeSide.TopLeft: case ResizeSide.BottomRight: cursorToSet = Cursors.SizeNWSE; break; case ResizeSide.TopRight: case ResizeSide.BottomLeft: cursorToSet = Cursors.SizeNESW; break; case ResizeSide.Top: case ResizeSide.Bottom: cursorToSet = Cursors.SizeNS; break; case ResizeSide.Left: case ResizeSide.Right: cursorToSet = Cursors.SizeWE; break; case ResizeSide.None: break; } return(cursorToSet); }
private void RefreshSideOver() { var worldX = Cursor.GetWorldX(); var worldY = Cursor.GetWorldY(); if (mResizeHandles.Visible == false) { SideOver = ResizeSide.None; } else { // If the user is already dragging then there's // no need to re-check which side the user is over if (Cursor.PrimaryPush || (!Cursor.PrimaryDown && !Cursor.PrimaryClick)) { SideOver = mResizeHandles.GetSideOver(worldX, worldY); } } }