PrintManager
This class is responsible for printing a diagram.
Inherits: FrameworkElement
Implements: IDocumentPaginatorSource
Constructors
Properties
public DataTemplate BackgroundTemplate { get; set; }
value = printManager.BackgroundTemplate
printManager.BackgroundTemplate = value
Gets or sets the DataTemplate printed as the background for each page.
public Rect Bounds { get; set; }
value = printManager.Bounds
printManager.Bounds = value
Gets or sets the area of the model to be printed, in model coordinates.
public Diagram Diagram { get; internal set; }
value = printManager.Diagram
printManager.Diagram = value
Gets the Diagram for which this PrintManager performs printing.
public virtual DocumentPaginator DocumentPaginator { get; }
value = printManager.DocumentPaginator
Do not use this property, but call DocumentPaginator}) to use a DocumentPaginator safely.
public DataTemplate ForegroundTemplate { get; set; }
value = printManager.ForegroundTemplate
printManager.ForegroundTemplate = value
Gets or sets the DataTemplate printed as the foreground for each page.
public Thickness Margin { get; set; }
value = printManager.Margin
printManager.Margin = value
Gets or sets the margins inside the page size, around the printed area.
public PrintPageOptions PageOptions { get; set; }
value = printManager.PageOptions
printManager.PageOptions = value
Gets or sets how printing fills each page.
public IEnumerable<Part> Parts { get; set; }
value = printManager.Parts
printManager.Parts = value
Gets or sets the collection of Parts to be printed.
public double Scale { get; set; }
value = printManager.Scale
printManager.Scale = value
Gets or sets the scale factor at which everything is printed.
Methods
protected virtual void OnCompleted()
printManager.OnCompleted()
This is called after the print operation has completed.
public void Paginate(Action<DocumentPaginator> act)
printManager.Paginate(act)
Use a DocumentPaginator in a safe manner.
- act
- an Action<DocumentPaginator> that is called with a DocumentPaginator with initialization work beforehand and cleanup work afterwards.
public void Print(PrintDialog dlg)
printManager.Print(dlg)
Print the diagram using the choices made in the given PrintDialog.
- dlg
Events
public event RoutedEventHandler Completed
printManager.Completed += handler
This RoutedEvent occurs when printing is completed.
Fields
public static readonly DependencyProperty BackgroundTemplateProperty
value = PrintManager.BackgroundTemplateProperty
Identifies the BackgroundTemplate dependency property.
public static readonly DependencyProperty BoundsProperty
value = PrintManager.BoundsProperty
Identifies the Bounds dependency property.
public static readonly RoutedEvent CompletedEvent
value = PrintManager.CompletedEvent
Identifies the Completed routed event.
public static readonly DependencyProperty ForegroundTemplateProperty
value = PrintManager.ForegroundTemplateProperty
Identifies the ForegroundTemplate dependency property.
public static readonly DependencyProperty MarginProperty
value = PrintManager.MarginProperty
Identifies the Margin dependency property
public static readonly DependencyProperty PageOptionsProperty
value = PrintManager.PageOptionsProperty
Identifies the PageOptions dependency property.
public static readonly DependencyProperty PartsProperty
value = PrintManager.PartsProperty
Identifies the Parts dependency property.
public static readonly DependencyProperty ScaleProperty
value = PrintManager.ScaleProperty
Identifies the Scale dependency property.