how to write silverlight threading function in another file or project
- by Piyush
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()