记录C#-WPF线程中如何修改值

new Thread(() =>

 {
     Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal,

        new Action(() =>

        {

            Thread.Sleep(TimeSpan.FromSeconds(2));

            this.lblHello.Content = "欢迎你光临WPF的世界,Dispatche 异步方法!!"+ DateTime.Now.ToString();

        }));

 }).Start();

 

你可能感兴趣的:(记录C#-WPF线程中如何修改值)