In WPF how to show changed state on controls before and after a time-intensive process completes? -


The LoadIt () method takes 5-10 seconds to complete. I want to display "Loading ..." before the message area LoadIt () starts and it wants to display "Reloaded" after it's finished.

How can I do this?

The following code does not work. Until all this ends, the labels do not update, at which point it only shows "Reloaded" again.

  Private Zero Button, Link (Object Sender, RoutedEventArgs e) {lblMessage.Text = "Loading ..."; load it(); LblMessage.Text = "Reloaded"; There are more than one solution to the discussion here: 


Comments