hello,
in my application i am updating the status bar text property many a times as the different part of code is executed. However, i can see only the last update been performed.
ex:
textBlock1.Text = " Launching your application. please wait ...";
/// some code
textBlock1.Text = " i am ready !";
// some more code here
textBlock1.Text = " done !";
output is :: done !
Is this because the updates are performed very fast?If so how do i handle this situation ? I want the text to stay for some time on screen before the next update.
I tried : thread.sleep(1000); but looks like it is not the right way and it is not working. can anyone help me on this?
thank you
Loading

Wim SturkenboomPosted Dec 29, 2014, 2:58 AM
Ref:http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.textblock.aspx#methods
Sanju SinghPosted Dec 29, 2014, 1:40 AM
Wim SturkenboomPosted Dec 29, 2014, 12:15 AM
well, this Refresh() method is not available ! I am using visual studio 2010
[/quote]
So what is the type of textBlock1? Is it a textbox, is it a label, is it a custom control, is it a statusbar?
According to MSDN, the refresh() method is available for the statusbar from (at least) dotnet framework 1.1 onwards; ref http://msdn.microsoft.com/en-us/library/system.windows.forms.statusbar_methods%28v=vs.71%29.aspx, from there you can check the newer versions
Sanju SinghPosted Dec 28, 2014, 11:53 PM
Sanju SinghPosted Dec 28, 2014, 11:48 PM
VulpesPosted Dec 28, 2014, 6:57 AM
Michal HabalcikPosted Dec 28, 2014, 6:08 AM
Here you can find more info about it: MSDN BackgroundWorker
Sanju SinghPosted Dec 28, 2014, 2:58 AM
Wim SturkenboomPosted Dec 28, 2014, 2:50 AM
textBlock1.Text = "hi";
textBlock1.Refresh();
System.Threading.Thread.Sleep(1000);
textBlock1.Text = "hallo";
textBlock1.Refresh();
System.Threading.Thread.Sleep(1000);
textBlock1.Text = "done";
textBlock1.Refresh();
System.Threading.Thread.Sleep(5000);
Don't slowdown user experience because YOU want to show something; if the code is fast, it is fast, nothing you WANT to do about that.