private void Window_Loaded(object sender, RoutedEventArgs e) { DataContext = new ContactsVM(); //System.Windows.Data.CollectionViewSource contactsVMViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("contactsVMViewSource"))); // Load data by setting the CollectionViewSource.Source property: // contactsVMViewSource.Source = [generic data source] }
private void Window_Loaded(object sender, RoutedEventArgs e) { DataContext = new ContactsVM(); }