Information générale
Catégorie:
Windows Presentation Foundation (WPF)
Versions des environnements
Network:
Windows 2008 Server
>>>It seems that just setting Status.Text=someValue from within a click event does not (vfp) refresh until the event is completed. How can this be done (in C#) if one wants to show the status of a multistage procedure by setting the Status.Text?
>>
>>If I understand correctly then you need to use a background worker to keep the UI responsive. e.g.:
>
>Right. Thank you very much. Was hoping for something simpler ;)
Just saw your PM so you were already on the right track.
In WPF everything is great but nothing is simple :-}
WinForms had the Application.DoEvents which could have updated your TextBlock OK but the form would be otherwise unresponsive between calls.
Of course the downside of BackgroundWorker is that you have to ensure that, because the form is still responsive, the user cannot perform inappropriate actions whilst the task is running.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement