Skip to content

Instantly share code, notes, and snippets.

@RickStrahl
RickStrahl / DebounceDispatcher.cs
Last active April 4, 2025 08:32
Debouncing events by a timeout using a Dispatcher.
public class DebounceDispatcher
{
private DispatcherTimer timer;
public void Debounce(int timeout, Action<object> action,
object param = null,
DispatcherPriority priority = DispatcherPriority.ApplicationIdle,
Dispatcher disp = null)
{
if (disp == null)