[英]WPF setting button cursor to busy what does it exactly mean
單擊按鈕時,我想將 cursor 設置為忙碌狀態。 在 Winform 中,我會在點擊事件中更改 cursor 並在執行點擊邏輯后恢復。 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! 謝謝!
在 XAML 中設置 cursor 屬性將在每次鼠標移到 Cursor 上時更改它。 你想要的是Mouse.OverrideCursor
到Cursors.Wait
,但你必須在你的代碼中做,而不是 xaml。 這是有道理的,如果你想等待 cursor,你的 xaml 通常不知道你的操作何時完成,因為你必須將它重置為之前的 state 或清除它。 有關更多信息,請參閱此帖子。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.