Tuesday, July 11, 2017

WPF Debounce trick

Sometimes you have to appreciate the power and simplicity that WPF(and by extend XAML has to offer). While having to do a lot of voodoo magic with Reactive Extensions to support debouncing, in WPF it can be reduced to one binding property,  the Delay Binding Property.


You can use the WPF Delay binding property to debounce binding events. For example following code will debounces the key input until nothing changes for 0.5 seconds:

Text="{Binding UserName,UpdateSourceTrigger=PropertyChanged,Delay=500}"


1 comment:

Philips Huges said...

Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much

Installment loans
Payday loans
Title loans
Cash Advances