Example #1
0
        public static void Print(RadGanttView ganttView)
        {
            var printDialog = new PrintDialog();
            if (printDialog.ShowDialog() == true)
            {
                var exportImages = Enumerable.Empty<BitmapSource>();
                var printingSettings = new ImageExportSettings(new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight), true, GanttArea.AllAreas);
                using (var export = ganttView.ExportingService.BeginExporting(printingSettings))
                {
                    exportImages = export.ImageInfos.ToList().Select(info => info.Export());
                }

                var paginator = new GanttPaginator(exportImages);
                printDialog.PrintDocument(paginator, "Print demo");
            }
        }
        public static void Print(RadGanttView ganttView)
        {
            var printDialog = new PrintDialog();

            if (printDialog.ShowDialog() == true)
            {
                var exportImages     = Enumerable.Empty <BitmapSource>();
                var printingSettings = new ImageExportSettings(new Size(printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight), true, GanttArea.AllAreas);
                using (var export = ganttView.ExportingService.BeginExporting(printingSettings))
                {
                    exportImages = export.ImageInfos.ToList().Select(info => info.Export());
                }

                var paginator = new GanttPaginator(exportImages);
                printDialog.PrintDocument(paginator, "Print demo");
            }
        }