Hello,
We have an application structured roughly like this:
<Grid x:Name="LayoutRoot">
<ScrollViewer>
<Canvas x:Name="canvas">
<StackPanel> < Button /><Slider /><Button /></StackPanel>
<custom:Blob />
<custom:Blob />
<custom:Blob />
</Canvas>
</ScrollViewer>
</Grid>
Each Blob consists of 1 or more rectangles, lines, and text boxes; they are positioned anywhere on the canvas.
If I print the document using the LayoutRoot:
PrintDocument pd = new PrintDocument();
pd += (s, pe) => { pe.PageVisual = LayoutRoot; };
pd.Print("Blobs");
... it is like a print-screen -- the scrollbars, the sliders, the blobs that are visible -- are printed.
If I set PageVisual = canvas, nothing is printed.
How can I get all the blob objects, and just those objects, to print? Do I need to copy them into another container, and give that container to PageVisual? Can I use a ViewBox to make sure they all fit on one page?
Thanks for any pointers....