DebounceDispatcher.Debounce

Debounce an event by resetting the event timeout every time the event is fired. The behavior is that the Action passed is fired only after events stop firing for the given timeout period.

Use Debounce when you want events to fire only after events stop firing after the given interval timeout period.

Wrap the logic you would normally use in your event code into the Action you pass to this method to debounce the event.

public void Debounce(int interval,
	Action<Object> action,
	object param,
	DispatcherPriority priority,
	Dispatcher disp)

Parameters

interval
Timeout in Milliseconds

action
Action to fire when debounced event fires

param
optional parameter

priority
optional priorty for the dispatcher

disp
optional dispatcher. If not passed or null CurrentDispatcher is used.


See also:

Class DebounceDispatcher

© West Wind Technologies, 2016-2023 • Updated: 11/23/21
Comment or report problem with topic