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