private async void Button_Click(object sender, RoutedEventArgs e) { this.LoadView.Visibility = Visibility.Collapsed; progrssBar.Visibility = Windows.UI.Xaml.Visibility.Visible; await Task.Delay(50); Stopwatch watch = new Stopwatch(); watch.Start(); employees = repository.GetEmployeesDetails(itemCount); watch.Stop(); PopulationTime.Text = watch.ElapsedMilliseconds.ToString() + " ms"; watch.Reset(); watch.Start(); this.syncGrid.ItemsSource = employees; watch.Stop(); LoadingTime.Text = watch.ElapsedMilliseconds.ToString() + " ms"; GridView.Visibility = Visibility.Visible; progrssBar.Visibility = Windows.UI.Xaml.Visibility.Collapsed; }
public DataVirtualizationViewModel() { var repository = new EmployeeInfoRepository(); viewSource = new GridVirtualizingCollectionView(repository.GetEmployeesDetails(1000000)); }