Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing a textbox
Message
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01605402
Message ID:
01612737
Vues:
33
Blimey - this is an old thread!

TBH I've not used MVVM Light but a quick read seems to suggest that it's DespatcherHelper class might be worth looking at ?
http://msdn.microsoft.com/en-us/magazine/dn630646.aspx

Don't think INotifyPropertyChanged in itself will help - you still need to run the task on another thread to keep the UI responsive...

HTH, Happy New Year....

>Am I right in assuming that this can be done implementing MVVMLight? I understood that there is a INotifyPropertyChanged. It allows the "databindings" to be updated whenever a property changes (quoting Laurent Bugnion on Pluralsight).
>
>Would that be a newbie thing, or should I wait until I grow up?
>
>
>>>>>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
Fil
Voir

Click here to load this message in the networking platform