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