private void Window_Loaded(object sender, RoutedEventArgs e) { var solicitacao = new SolicitacaoDeConsultaDeModelos { }; var modelos = consultaDeModelos.ConsultaModelos(solicitacao); CollectionViewSource modelosViewSource = ((CollectionViewSource)(this.FindResource("modelosViewSource"))); modelosViewSource.Source = modelos; }
private void Window_Loaded(object sender, RoutedEventArgs e) { var solicitacao = new SolicitacaoDeConsultaDeModelos { }; var modelos = consultaDeModelos.ConsultaModelos(solicitacao); var list = modelos.Select(p => ItemDeConsultaDeModeloViewModel.From(p, selecteds)).ToList(); CollectionViewSource modelosViewSource = ((CollectionViewSource)(this.FindResource("modelosViewSource"))); modelosViewSource.Source = list; }