In This Article

PrintSettings Class

Represents the default implementation of an object that supports printing the contents of a SyntaxEditor.

public class PrintSettings : IPrintSettings
Inheritance:
object object
Implements:
IPrintSettings

Constructors

PrintSettings()

Initializes an instance of the class.

public PrintSettings()

Properties

AreCollapsedOutliningNodesAllowed

Indicates whether collapsed outlining nodes are allowed.

public bool AreCollapsedOutliningNodesAllowed { get; set; }

Property Value

bool:

true if collapsed outlining nodes are allowed; otherwise, false. The default value is false.

Remarks

When false, all collapsed outlining nodes will be expanded within the printout.

AreColumnGuidesVisible

Indicates whether column guides are visible.

public bool AreColumnGuidesVisible { get; set; }

Property Value

bool:

true if column guides are visible; otherwise, false. The default value is false.

AreIndentationGuidesVisible

Indicates whether indentation guides are visible.

public bool AreIndentationGuidesVisible { get; set; }

Property Value

bool:

true if indentation guides are visible; otherwise, false. The default value is false.

AreSquiggleLinesVisible

Indicates whether squiggle lines are visible.

public bool AreSquiggleLinesVisible { get; set; }

Property Value

bool:

true if squiggle lines are visible; otherwise, false. The default value is false.

DocumentTitle

The document title that should appear at the top of every page.

public string? DocumentTitle { get; set; }

Property Value

string

Remarks

This is often set to the filename of the document.

HighlightingStyleRegistry

The IHighlightingStyleRegistry to use for printouts, if different than the active registry in the editor.

public IHighlightingStyleRegistry? HighlightingStyleRegistry { get; set; }

Property Value

IHighlightingStyleRegistry

Remarks

If this property is null, the active registry in the editor will be used. This property should generally be set when the editor is using a dark theme, since printouts require a light theme.

IsDocumentTitleMarginVisible

Indicates whether the document title margin is visible.

public bool IsDocumentTitleMarginVisible { get; set; }

Property Value

bool:

true if the document title margin is visible; otherwise, false. The default value is true.

IsLineNumberMarginVisible

Indicates whether the line number margin is visible.

public bool IsLineNumberMarginVisible { get; set; }

Property Value

bool:

true if the line number margin is visible; otherwise, false. The default value is false.

IsPageNumberMarginVisible

Indicates whether the page number margin is visible.

public bool IsPageNumberMarginVisible { get; set; }

Property Value

bool:

true if the page number margin is visible; otherwise, false. The default value is true.

IsSyntaxHighlightingEnabled

Indicates whether syntax highlighting is enabled.

public bool IsSyntaxHighlightingEnabled { get; set; }

Property Value

bool:

true if syntax highlighting is enabled; otherwise, false. The default value is true.

IsWhitespaceVisible

Indicates whether whitespace (spaces and tabs) is visible.

public bool IsWhitespaceVisible { get; set; }

Property Value

bool:

true if whitespace (spaces and tabs) is visible; otherwise, false. The default value is false.

IsWordWrapGlyphMarginVisible

Indicates whether the word wrap glyph margin is visible.

public bool IsWordWrapGlyphMarginVisible { get; set; }

Property Value

bool:

true if the word wrap glyph margin is visible; otherwise, false. The default value is true.

PageMargin

The Thickness of the page margin.

public Thickness PageMargin { get; set; }

Property Value

Thickness

Remarks

The default value is 96 * 0.75, where 1 inch = 96px in default resolution. This means the default margin is 0.75in.

PageSize

The System.Windows.Size of each page.

public Size? PageSize { get; set; }

Property Value

Size

Remarks

A standard 8.5" x 11" page would have values 96 * 8.5, 96 * 11, where 1 inch = 96px in default resolution.

ViewMarginFactories

The collection that contains the IPrinterViewMarginFactory objects used to generate the margins for an IPrinterView.

public IPrinterViewMarginFactoryCollection ViewMarginFactories { get; }

Property Value

IPrinterViewMarginFactoryCollection:

A IPrinterViewMarginFactoryCollection that contains the factories. The default collection contains a DefaultPrinterViewMarginFactory.

Methods

CreateFixedDocument(SyntaxEditor)

Creates a FixedDocument representation of the editor contents, allowing for printing.

public FixedDocument CreateFixedDocument(SyntaxEditor syntaxEditor)
Parameter Type Description
syntaxEditor SyntaxEditor

The SyntaxEditor for which to create a FixedDocument.

Returns

FixedDocument

CreateFixedDocument(SyntaxEditor, IPrinterViewOptions?)

Creates a FixedDocument representation of the editor contents, allowing for printing.

public FixedDocument CreateFixedDocument(SyntaxEditor syntaxEditor, IPrinterViewOptions? options)
Parameter Type Description
syntaxEditor SyntaxEditor

The SyntaxEditor for which to create a FixedDocument.

options IPrinterViewOptions

An IPrinterViewOptions that contains IPrinterView-related options.

Returns

FixedDocument

Inherited Members

Extension Methods