WPF setting button cursor to busy what does it exactly mean
I would like to set the cursor to busy status when the button is clicked. In a Wi开发者_如何学编程nform i would have changed the cursor in the click event and revert back after the click logic is executed. Now reading through few posts about Cursor in WPF , i just want to make sure if Setting the cursor property of the button (its in a UserControl) through xaml means -> show the cursor when the button is clicked! Thanks!
Setting the cursor property in XAML will change the Cursor everytime your mouse moves over it. What you want is Mouse.OverrideCursor
to Cursors.Wait
, but you have to do it in your code, not xaml. Which makes sense, if you want a wait cursor, your xaml usually don't know when your operation is finished, because you have to reset it to the previous state or clear it. See this post for further info.
精彩评论