Northwoods.GoSilverlight 1.3.5 Assembly
PrintManager Class
Members  See Also  Send Feedback
Northwoods.GoXam Namespace : PrintManager Class

This class is responsible for printing a diagram.

Syntax

Visual Basic (Declaration) 
Public Class PrintManager 
   Inherits System.Windows.FrameworkElement
C# 
public class PrintManager : System.Windows.FrameworkElement 

Remarks

Call the PrintManager.Print method to perform printing. If the area to be printed is large enough, it will print enough pages to cover the area. The sheets of paper may be taped together to produce a large drawing.

Although this class inherits from FrameworkElement in order to support data binding, it is not really a FrameworkElement or UIElement! Please ignore all of the properties, methods, and events defined by FrameworkElement and UIElement.

Normally this will print all of the Nodes and Links in the Diagram within the DiagramPanel.DiagramBounds. You can specify what parts it prints by supplying the Parts collection. You can also limit the area of the model that is printed by setting the Bounds property.

You can also control whether the Diagram's Background or any background Diagram.GridPattern is printed, by setting the PageOptions property. By default, only the grid is printed. If you want to have the grid and templates fill the whole page, set the PageOptions property to include PrintPageOptions.Full, for example: PageOptions="FullGridBackground".

The size on the page for the printed parts is governed by the Scale property. You can set that property to zero to cause it to scale everything to fit on one page. Otherwise the number of pages that will be printed will depend on the area to be printed (determined by either the parts that are printed or the specified Bounds) times the Scale, as will fit in the size of each page minus the Margins.

You can print decorations on each page by specifying the BackgroundTemplate and/or the ForegroundTemplate. These templates are applied to each page, data-bound to an instance of PrintManager.PageInfo describing that page. This makes it easy to customize the header or footer. For example: <go:Diagram . . .> <go:Diagram.PrintManager> <go:PrintManager> <go:PrintManager.BackgroundTemplate> <DataTemplate> <go:SpotPanel> <TextBlock Text="Confidential" Foreground="LightGray" FontSize="50" RenderTransformOrigin="0.5 0.5"> <TextBlock.RenderTransform> <RotateTransform Angle="-45" /> </TextBlock.RenderTransform> </TextBlock> </go:SpotPanel> </DataTemplate> </go:PrintManager.BackgroundTemplate> </go:PrintManager> </go:Diagram.PrintManager> </go:Diagram>

You can see the definition of the standard ForegroundTemplate in the Generic.XAML file that is in the docs subdirectory of the GoXam installation. It includes cut marks so that you can cut off the right sides and the bottoms of each of the pages that are not in the last column or the last row, allowing you to tape the sheets together to form a visually continuous diagram.

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.UIElement
         System.Windows.FrameworkElement
            Northwoods.GoXam.PrintManager

Requirements

See Also

© 2012 All Rights Reserved.