How to make the text in the label change dynamically AFTER opening the window? (the window opens, text 1 is displayed, after a few seconds it changes to text2 ...)
public MainWindow()
{
InitializeComponent();
System.Threading.Thread.Sleep(5000);
lblText.Content = "Sent for analysis";
System.Threading.Thread.Sleep(5000);
lblText.Content = "Analysis in progress";
System.Threading.Thread.Sleep(5000);
lblText.Content = "Analysis results";
}
At this moment, the window is displayed only when all operations are performed and only the last text is visible.
This is an example code. There is an API in my program and waiting for a response. The window is shown only after the whole code has been executed and how Api will respond (after 15sec).
I want it to work in the net framework 3.0.