5
Answers

Text Message in a window while waiting for an event to occur

Sutton Mehaffey

Sutton Mehaffey

12y
1.5k
1
I am trying to display a message like 'Please Wait...' in a window, while an event is taking place.  I don't want a message box, because that requires a button press.  I just want this to be message that I can display and erase.

I've tried adding a TextBlock in the window (WPF), with an initial value of "", then changing the value right before I start the event (in C#), but the message doesn't appear until after the event happens.  The event I am doing is creating a window with removable drives, which takes a short amount of time.  I think the message appears when the ShowDialog for the new window happens.  How do I redraw/refresh the current window with the TexBlock before my event starts so that I get the 'Please Wait...' message immediately?  Or, is there a different way of doing this?

Sutton

Answers (5)