From the course: Windows Presentation Foundation 5: Interaction and Controls

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

The RepeatButton

The RepeatButton

From the course: Windows Presentation Foundation 5: Interaction and Controls

Start my 1-month free trial

The RepeatButton

- [Instructor] The button class fires the click event once when the user clicks the button. The repeat button functions like the regular button, but continuously fires click events while the button remains depressed. By default, that repeat button waits 500 milliseconds after firing the first click event, and then begins firing click rapidly. These default values are based on the keyboard repeat speeds configured on the user's computer system. That means if the user has a slow key repeat rate, the repeat button will repeat at that slower speed. You can configure these values using these properties. Delay is the initial delay to wait after the first click event before repeatedly firing additional events. Interval is the time to wait between click events. For this demo, I have four repeat buttons docked to the edge of the screen. They're inside a dock panel. And inside the center of the dock panel is an image. Each of these buttons is using the standard click event. So you see I have a…

Contents