In This Article

PrinterPageNumberMargin Class

Represents a default implementation of a page number margin for an IPrinterView.

public class PrinterPageNumberMargin : PrinterViewMarginBase, IInputElement, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable, IPrinterViewMargin, ITextViewMargin, IOrderable, IKeyedObject
Inheritance:
object MarshalByRefObject DisposableObject LogicalTreeNodeBase UIElement PrinterViewMarginBase object
Implements:
IInputElement IUIElement ILogicalTreeNode IDpiAwareElement IDisposable IPrinterViewMargin ITextViewMargin IOrderable IKeyedObject

Constructors

PrinterPageNumberMargin(IPrinterView)

Initializes an instance of the PrinterPageNumberMargin class.

public PrinterPageNumberMargin(IPrinterView view)
Parameter Type Description
view IPrinterView

The IPrinterView that will host the margin.

Properties

PageNumberText

Gets the pages number text.

public string PageNumberText { get; }

Property Value

string:

The pages number text.

Methods

Draw(TextViewDrawContext)

Draws the margin and its content.

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

The TextViewDrawContext to use for rendering.

MeasureOverride(Graphics, Size)

Measures the size required for the element and its child elements.

protected override Size MeasureOverride(Graphics g, Size availableSize)
Parameter Type Description
g Graphics

The Graphics to use for measurement.

availableSize Size

The available size.

Returns

Size:

The desired size.

UpdateVisibility()

Updates the visibility of the margin.

public override void UpdateVisibility()

Inherited Members