How can I implement Delay property from .Net 4.5 (described here) on binding in .Net 4.0?
I know I cannot inherit from BindingBase as ProvideValue is sealed.
I could implement MarkupExtension but it means I now have to rewrite all properties from BindingExtension is there any other way?
I would create an
AttachedPropertythat specifies the amount of time to Delay. TheAttachedPropertywould start (or reset) a timer when the bound value changes, and would manually update the bound source when the specified amount of time gets reached.You can use the following to update the source binding:
Edit
I was fixing a bug in some old code today and noticed it implemented a delayed property change notification using an Attached Behavior. I thought of this question, so followed the link that I had commented in the code, and found myself at a question I had posted a while ago on SO about delaying a binding. The top answer is the one I have implemented currently, which is some attached properties that updates the source of a binding after X milliseconds have passed.