I know this is an old thread. But if someone is still interested ...
You can use PriorityBinding, there is an excellently explained example in this article: http://www.switchonthecode.com/tutorials/wpf-tutorial-priority-bindings
The idea is to specify a PriorityBinding, which in turn defines several regular bindings like this:
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"> <TextBlock.Text> <PriorityBinding> <Binding ElementName="MainWindow" Path="Slow" IsAsync="True" /> <Binding ElementName="MainWindow" Path="Fast" /> </PriorityBinding> </TextBlock.Text> </TextBlock>
The order of bindings determines the priority with the highest priority. In this case, Fast binding (the lowest priority) will immediately fill in the text block, because you may have the "Loading ..." or "Sort ..." string property, depending on what is happening at that time, and eat without delay.
But later, when the property of slow asynchronous binding returns a value, a higher priority means that it will be accepted, since it is previously in the list, and its results will be bound instead, showing the actual results.
If you need to populate a progress popup, you can implement this in the getter of the related property in your ViewModel, although I have not tried anything like this.
TripleAntigen
source share