Ejemplo n.º 1
0
 private void PrintDataTableClick(object sender, RoutedEventArgs e)
 {
     var dataTable = CreateSampleDataTable();
     var columnWidths = new List<double>() {30, 40, 300, 300, 150};
     var ht = new HeaderTemplate();
     var headerTemplate = XamlWriter.Save(ht);
     var printControl = PrintControlFactory.Create(dataTable, columnWidths, headerTemplate);
     printControl.ShowPrintPreview();
 }
        private void PrintDataTableClick(object sender, RoutedEventArgs e)
        {
            var dataTable    = CreateSampleDataTable();
            var columnWidths = new List <double>()
            {
                30, 40, 300, 300, 150
            };
            var ht             = new HeaderTemplate();
            var headerTemplate = XamlWriter.Save(ht);
            var printControl   = PrintControlFactory.Create(dataTable, columnWidths, headerTemplate);

            printControl.ShowPrintPreview();
        }