記錄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();
相關文章
相關標籤/搜索