C# Class PdfSharp.Forms.PagePreview

Represents a preview control for an XGraphics page. Can be used as an alternative to System.Windows.Forms.PrintPreviewControl.
Inheritance: System.Windows.Forms.UserControl
Afficher le fichier Open project: DavidS/MigraDoc Class Usage Examples

Private Properties

Свойство Type Description
CalculatePreviewDimension void
CalculatePreviewDimension void
DrawDash void
InitializeComponent void
PaintBackground void
RenderPage bool

Méthodes publiques

Méthode Description
LayoutChildren ( ) : void
OnScroll ( object obj, ScrollEventArgs e ) : void
OnValueChanged ( object obj, EventArgs e ) : void
PagePreview ( ) : System

Initializes a new instance of the PagePreview class.

SetRenderEvent ( RenderEvent renderEvent ) : void

Sets a delagate that is invoked when the preview wants to be painted.

SetScrollBarRange ( ) : void

Adjusts scroll bars.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnInvalidated ( System.Windows.Forms.InvalidateEventArgs e ) : void

Invalidates the canvas.

OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void

Layouts the child controls.

OnPaintBackground ( PaintEventArgs e ) : void

Paints the background with the sheet of paper.

OnSizeChanged ( EventArgs e ) : void

Recalculates the preview dimension.

OnZoomChanged ( EventArgs e ) : void

Raises the ZoomChanged event when the zoom factor changed.

Private Methods

Méthode Description
CalculatePreviewDimension ( ) : void
CalculatePreviewDimension ( bool &zoomChanged ) : void

Calculates all values for drawing the page preview.

DrawDash ( Graphics gfx, Rectangle rect ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

PaintBackground ( Graphics gfx ) : void

Paints the background and the empty page.

RenderPage ( Graphics gfx ) : bool

Method Details

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

LayoutChildren() public méthode

public LayoutChildren ( ) : void
Résultat void

OnInvalidated() protected méthode

Invalidates the canvas.
protected OnInvalidated ( System.Windows.Forms.InvalidateEventArgs e ) : void
e System.Windows.Forms.InvalidateEventArgs
Résultat void

OnLayout() protected méthode

Layouts the child controls.
protected OnLayout ( System.Windows.Forms.LayoutEventArgs levent ) : void
levent System.Windows.Forms.LayoutEventArgs
Résultat void

OnPaintBackground() protected méthode

Paints the background with the sheet of paper.
protected OnPaintBackground ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void

OnScroll() public méthode

public OnScroll ( object obj, ScrollEventArgs e ) : void
obj object
e System.Windows.Forms.ScrollEventArgs
Résultat void

OnSizeChanged() protected méthode

Recalculates the preview dimension.
protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnValueChanged() public méthode

public OnValueChanged ( object obj, EventArgs e ) : void
obj object
e System.EventArgs
Résultat void

OnZoomChanged() protected méthode

Raises the ZoomChanged event when the zoom factor changed.
protected OnZoomChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

PagePreview() public méthode

Initializes a new instance of the PagePreview class.
public PagePreview ( ) : System
Résultat System

SetRenderEvent() public méthode

Sets a delagate that is invoked when the preview wants to be painted.
public SetRenderEvent ( RenderEvent renderEvent ) : void
renderEvent RenderEvent
Résultat void

SetScrollBarRange() public méthode

Adjusts scroll bars.
public SetScrollBarRange ( ) : void
Résultat void