Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# WPF Perform action while button down

Tags:

c#

wpf

How can I detect that the button in my application is still clicked (down)? and how to know when it is released?

like image 402
sikas Avatar asked Jul 06 '10 01:07

sikas


1 Answers

Are you looking for RepeatButton? It's one of the built-in WPF button controls, and it raises its Click event repeatedly if you press and hold the button. It's used internally to implement things like the "up-arrow" and "down-arrow" buttons on a scrollbar.

like image 128
Joe White Avatar answered Oct 02 '22 13:10

Joe White