private void Button_Click(object sender, RoutedEventArgs e) { var grid = ChildFinders.FindChild <DataGrid>(this, "grid"); var vm = this.DataContext as DataPresenterViewModel; Printer.PrintDataViewer(vm, grid); }
private void Button_Click(object sender, RoutedEventArgs e) { var grid = ChildFinders.FindChild <DataGrid>(this, "grid"); var vm = (this.DataContext as PayNReadReportBuilderViewModel).Reports[0]; // first report from two Printer.PrintDataViewer(vm, grid); }