(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

Tip: How to change the cursor of a control?

(0 votes)
Denislav Savkov
>
Denislav Savkov
Joined Feb 11, 2008
Articles:   14
Comments:   6
More Articles
0 comments   /   posted on Sep 02, 2008
Tags:   cursor , denislav-savkov
Categories:   Controls

Control's cursors can be changed very easily in Silverlight. All controls that derive from System.Windows.FrameworkElement have Cursor property that can be set from Xaml or the code behind. The value for that property should be one of the predefined cursors such as Hand, Wait, Arrow, IBeam etc. declared in the static class System.Windows.Input.Cursors.

Xaml

 <Button x:Name="pushMeButton" Content="Push me now!" Cursor="Hand"></Button>
 
C#
 pushMeButton.Cursor = Cursors.Hand;
That's it!

Subscribe

Comments

No comments

Add Comment

Login to comment:
  *      *       
Login with Facebook