Posted by: MarkWPF
This is quite a useful binding helper when you are in a scenario where you have a binding to a slow value.
What I mean by that is that sometimes a value may appear in your data source slowly because it is being created via a remote service for example, especially if in the scenario you cannot determine when the value will be received back.
What this markup extension allows you to do is specify a list of bindings, like this:
<PriorityBinding FallbackValue="default text" >
<Binding Path="Slowest" IsAsync="True">
<Binding Path="Medium" IsAsync="True">
<Binding Path="Fast" >
In this example, assume the slowest takes 8 seconds, the Medium 5 seconds and the Fast is merely nanoseconds
WPF will try the slowest first, but as it’s not there move on to the medium one. That’s not there either so it moves on to the last one, and as that is very fast it will display that one.
What’s even better is that WPF will then display the Medium one after 5 seconds and the slow one after 8 seconds!