|
-
December 13th, 2011, 11:58 AM
#1
Updating the current window on demand
I have a WPF control TBStatus that is a TextBlock, with a hidden 'Please Wait...'.
What's the best way to actually update the screen after each delay? It waits the 10 seconds and puts up the control. I tried a Dispatcher and same thing. What's the trick?
TBStatus.Foreground = Brushes.Red;
for (i = 0; i < 5; i++)
{
TBStatus.Visibility = Visibility.Visible;
Thread.Sleep(1000);
TBStatus.Visibility = Visibility.Hidden;
Thread.Sleep(1000);
}
TBStatus.Visibility = Visibility.Visible;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|