Files
2016-03-21 11:31:42 +01:00

27 lines
629 B
C#

using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace PointerButton
{
public class PointerButton : Button
{
private static readonly CoreCursor handCursor = new CoreCursor(CoreCursorType.Hand, 1);
private static readonly CoreCursor arrowCursor = new CoreCursor(CoreCursorType.Arrow, 1);
public PointerButton() : base()
{
PointerEntered += (sender, e) =>
{
Window.Current.CoreWindow.PointerCursor = handCursor;
};
PointerExited += (sender, e) =>
{
Window.Current.CoreWindow.PointerCursor = arrowCursor;
};
}
}
}