In This Article

PrinterViewMarginBase Class

Provides the abstract base class for a printer view margin.

public abstract class PrinterViewMarginBase : Control, IPrinterViewMargin, ITextViewMargin, IOrderable, IKeyedObject
Inheritance:
object Visual UIElement FrameworkElement Control object
Derived:
PrinterDocumentTitleMargin PrinterLineNumberMargin PrinterPageNumberMargin PrinterWordWrapGlyphMargin
Implements:
IPrinterViewMargin ITextViewMargin IOrderable IKeyedObject

Constructors

PrinterViewMarginBase(IPrinterView, string, PrinterViewMarginPlacement, IEnumerable<Ordering>?)

protected PrinterViewMarginBase(IPrinterView view, string key, PrinterViewMarginPlacement placement, IEnumerable<Ordering>? orderings = null)
Parameter Type Description
view IPrinterView

The IPrinterView that will host the margin.

key string

The string-based key that identifies the margin.

placement PrinterViewMarginPlacement

A EditorViewMarginPlacement indicating the placement of the margin within its parent IPrinterView.

orderings IEnumerable<Ordering>

The collection of Ordering objects, used to determine how this object is positioned relative to other objects.

Properties

Key

The string-based key that identifies the object.

public string Key { get; }

Property Value

string

Orderings

The collection of Ordering objects, used to determine how this object is positioned relative to other objects.

public IEnumerable<Ordering>? Orderings { get; }

Property Value

IEnumerable<Ordering>

Placement

A PrinterViewMarginPlacement indicating the placement of the margin within its parent ITextView.

public PrinterViewMarginPlacement Placement { get; }

Property Value

PrinterViewMarginPlacement

View

The IPrinterView that contains this margin.

public IPrinterView View { get; }

Property Value

IPrinterView

VisualElement

The FrameworkElement that is used to render this margin in the user interface.

public FrameworkElement VisualElement { get; }

Property Value

FrameworkElement

Methods

Draw(TextViewDrawContext)

Draws the margin and its content.

public virtual void Draw(TextViewDrawContext context)
Parameter Type Description
context TextViewDrawContext

The TextViewDrawContext to use for rendering.

UpdateVisibility()

Updates the visibility of the margin.

public virtual void UpdateVisibility()

Extension Methods