The LoadIt() method below takes 5-10 seconds to complete. I want the message area to display ‘Loading…’ before LoadIt() starts and display ‘Reloaded’ after it finishes.
How can I do that?
The following code doesn’t work. It seems to not update the label until everything is finished, at which point it just displays ‘Reloaded’ again.
private void Button_Click(object sender, RoutedEventArgs e) { lblMessage.Text = 'Loading...'; LoadIt(); lblMessage.Text = 'Reloaded'; }
There’s more than one solution discussed here:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/6fce9b7b-4a13-4c8d-8c3e-562667851baa/