ViewPort printing

Oct 16, 2011 at 4:06 AM

How can i make printings of an Helix viewport, passing the visual tree to the PrintVisual method of the PrintDialogPrintDialog class ? Or with any method you preconize ? Thank's a lot for your impressive toolkit. Michel.

Coordinator
Oct 16, 2011 at 6:26 PM

hi Michel,

yes, printing should be very easy - use the PrintDialog and PrintVisual.

I just tested the following code in ExportDemo:

        private void Print_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new PrintDialog();
            if (dlg.ShowDialog().GetValueOrDefault())
            {
                dlg.PrintVisual(view1.Viewport, this.Title);
            }
        }

where view1 is the HelixViewport3D control.

ps. You could also export the Viewport3D to a bitmap at higher resolution and add this image to your print document.

Oct 17, 2011 at 3:35 AM

Wonderfuf Objo ! i have implemented your solution to the AudioDemo sample that i'm transforming to produce Business Intelligence 3D visualization ! I will give you later some feedback with sample outputs ! Kind regards. Michel.

Coordinator
Oct 17, 2011 at 8:08 AM

cool, send some sample outputs, it is interesting to see how the library is being used!