Answers for "how to change something in the window using a thread wpf"

C#
0

how to change something in the window using a thread wpf

private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        new Thread(DoSomething).Start();
    }
    public void DoSomething()
    {
        for (int i = 0; i < 100000000; i++)
        {
               this.Dispatcher.Invoke(()=>{
               textbox.Text=i.ToString();
               });    
        } 
    }
Posted by: Guest on August-17-2021

Code answers related to "how to change something in the window using a thread wpf"

C# Answers by Framework

Browse Popular Code Answers by Language