public ListStaffpage() { InitializeComponent(); ProgressBar_.IsEnabled = true; ProgressBar_.Visibility = Visibility.Visible; Thread thread = new Thread(delegate() { ObservableCollection <Staff> staffs = new ObservableCollection <Staff>(); staffs = manage.LoadData_Staff(); Dispatcher.Invoke(() => { liststaff.ItemsSource = staffs; ProgressBar_.IsEnabled = false; ProgressBar_.Visibility = Visibility.Hidden; }); }); thread.Start(); }