private void Start_Example() { for (i = 0; i < 1000; i++) { Thread.Sleep(100); this.Dispatcher.BeginInvoke(() => { lblResult.Text = i.ToString(); }); } } private void btnStart_Click(object sender, RoutedEventArgs e) { ThreadStart st = new ThreadStart(Start_Example); Thread s = new Thread(st); s.Start(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)