private void MethodLoadHeader() { CollectionESGR_Motivo.Source = new BSGR_Motivo().CollectionESGR_Motivo(); Application.Current.Dispatcher.Invoke(() => { CollectionESGR_Motivo.Add(new ESGR_Motivo() { CodMotivo = "TOD", Motivo = "TODOS" }); if (MethodValidaCaja()) { return; } }); SelectedFechaDesde = (SelectedFechaHasta = DateTime.Now); SelectedESGR_Motivo = CollectionESGR_Motivo.FirstOrDefault(x => x.CodMotivo == "TOD"); PropertyValidaFecha = true; CmpLoading.LoadDetail(); }