1
我正在使用C#
在Windows應用商店應用中工作。在鼠標懸停上更改光標而不是在Windows應用程序上工作
我想改變光標,當用戶將鼠標懸停在矩形上,但它導致我的問題。
這裏是我的代碼:
Rectangle item = sender as Rectangle;
item.Cursor = Cursors.AppStarting;
mouseVerticalPosition = e.GetCurrentPoint(null).Position.Y;
mouseHorizontalPosition = e.GetCurrentPoint(null).Position.X;
isMouseCaptured = true;
item.CapturePointer(e.Pointer);
它說'Windows.UI.Xaml.Shapes.Rectangle' does not contain a definition for 'Cursor'
。