Change cursor to hand when I hover over a button

Lamawy picture Lamawy · Apr 16, 2014 · Viewed 45k times · Source

I want to change the cursor to hand when hovering over a button, for example, I have this button :

<Button Content="" HorizontalAlignment="Left" Margin="229,128,0,0" VerticalAlignment="Top" Height="107" Width="170" Grid.RowSpan="2">
     <Button.Template>
         <ControlTemplate TargetType="Button">
             <Grid>
                 <Grid.Background>
                     <ImageBrush ImageSource="africa/picture17.png"/>
                 </Grid.Background>
                 <ContentPresenter/>
             </Grid>
         </ControlTemplate>
     </Button.Template>
</Button>

How to change the cursor to hand when I hover over the button? I'm using Visual Studio 2013 for Windows Store 8 and C#-XAML.

Answer

gleng picture gleng · Apr 16, 2014

You can do this by changing the Cursor property:

<Button Cursor="Hand" .../>