wpf不知道怎么实现
只知道winform下的实现方法。。在新线程里用委托实现对label.Text的更改

解决方案 »

  1.   

    Task.Factory.StartNew(()=>
    {
       int count=5;
       while(count>=0)
       {
          this.Invoke(new Action(()=>
          {
              lable.Text=count.toString();
           }));
           count--;
           Thread.Sleep(1000);
        }
        this.Invoke(new Action(()=>
          {
              lable.Text="加载";
           }));
    });
      

  2.   

    Thread ths = new Thread(()=>{
              Thread.Sleep(5000);
              textbloc.Text = "加载";
    });
    ths.IsBackground = True;
    ths.Start();
      

  3.   

    Task.Factory.StartNew(()=>
     {  
            Thread.Sleep(5000);
            this.Invoke(new Action(()=>
           {
               label.Text="加载";
            }));
     });