J
J
Jomm2021-07-30 22:47:41
WPF
Jomm, 2021-07-30 22:47:41

How to update the GUI using a different thread?

Please help me to change the Content in Label1 using another thread.

private void Button_Click(object sender, RoutedEventArgs e)
{
   Thread thr = new Thread(BT7274);
   thr.IsBackground = true;
   thr.Start();
}
Static Void BT7274()
{
   Label1.Content = "BT7274";
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BasiC2k, 2021-07-30
@Jomm

Perhaps this will help you.
https://www.cyberforum.ru/wpf-silverlight/thread42...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question