private void UnCheckArchivoAsunto(object sender, RoutedEventArgs e) { CheckBox check = (CheckBox)sender; VMAsuntos elemento = check.DataContext as VMAsuntos; if (elemento != null) { elemento.IsSelected = false; } }
private void SetViewModel() { this.viewModel = new VMAsuntos(); this.DataContext = viewModel; BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += new DoWorkEventHandler(ArchivosAsuntoDoWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(AsuntosArchivosCompleted); worker.RunWorkerAsync(); }