how to write silverlight threading function in another file or project

Posted by Piyush on Stack Overflow See other posts from Stack Overflow or by Piyush
Published on 2010-04-30T06:33:51Z Indexed on 2010/04/30 6:37 UTC
Read the original article Hit count: 236

Filed under:
|

I am using three tier architecture.I have SilverlightUI and UIController two projects.SilverlightUI contains only UI pages and controls while UIController contains all proxies of WCF services. Now I have created threads to update my controls dynamically and to do processing parallel.AS the requirement I want to define all functionality of threads in UIController projects.What should I do? Currenty what I am doing -

private void Button_Click(object sender, RoutedEventArgs e)
  {
  StartThreads();
  }
private void StartThreads()
    {
    private Thread _thread1;
    _thread1 = new Thread(DoThread1);
    _thread1.Start();
    }
public static void DoThread1()
    {
     _data1.Dispatcher.BeginInvoke(delegate()
            {
                _data1.Text = _count1.ToString();

            });
     System.Threading.Thread.Sleep(1000);
    }

>>I Want to write DoThread1() method in UIController project and call that function from here button_click()

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about multithreading