private void Historal_Click(object sender, RoutedEventArgs e) { HistorialView addFactura = new HistorialView(); ModifyCategoriaViewModel viewModel = this.ConvertDataContext(this.DataContext); addFactura.DataContext = viewModel.CreateHistorialViewModel(); addFactura.ShowDialog(); }
private ModifyCategoriaViewModel ConvertDataContext(object dataSource) { ModifyCategoriaViewModel viewModel = dataSource as ModifyCategoriaViewModel; return(viewModel); }