Tuesday, February 2, 2010

Silverlight: how to update UI before time comsumming process


I was trying to make my Silverlight application to update UI before start a time consuming process. For some reason, I can use put that process in new thread. So I have to implement some technique as following:


    this.UpdateLayout(); //I want UI update before start that process

    new Thread(() =>


        Thread.Sleep(100);  //Update UI first

        this.Dispatcher.BeginInvoke(() =>


            //Long time process, which stop UI updates



No comments: