0

ViewPort printing

Anonymous 5 years ago 0
This discussion was imported from CodePlex

mpolitis wrote at 2011-10-16 06:06:

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.


objo wrote at 2011-10-16 20:26:

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.


mpolitis wrote at 2011-10-17 05:35:

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.


objo wrote at 2011-10-17 10:08:

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