PdfSharp-WPF  1.31.7289
PdfSharp.Forms.PagePreview Class Reference

Represents a preview control for an XGraphics page. Can be used as an alternative to System.Windows.Forms.PrintPreviewControl. More...

Inheritance diagram for PdfSharp.Forms.PagePreview:

Public Member Functions

delegate void RenderEvent (XGraphics gfx)
 A delegate for invoking the render function. More...
 
 PagePreview ()
 Initializes a new instance of the PagePreview class. More...
 
void SetRenderEvent (RenderEvent renderEvent)
 Sets a delagate that is invoked when the preview wants to be painted. More...
 

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used. More...
 
virtual void OnZoomChanged (EventArgs e)
 Raises the ZoomChanged event when the zoom factor changed. More...
 
override void OnPaintBackground (PaintEventArgs e)
 Paints the background with the sheet of paper. More...
 
override void OnSizeChanged (EventArgs e)
 Recalculates the preview dimension. More...
 
override void OnInvalidated (InvalidateEventArgs e)
 Invalidates the canvas. More...
 
override void OnLayout (LayoutEventArgs levent)
 Layouts the child controls. More...
 

Properties

new BorderStyle BorderStyle [get, set]
 Gets or sets the border style of the control. More...
 
Zoom Zoom [get, set]
 Gets or sets a predefined zoom factor. More...
 
int ZoomPercent [get, set]
 Gets or sets an arbitrary zoom factor. The range is from 10 to 800. More...
 
Color PageColor [get, set]
 Gets or sets the color of the page. More...
 
Color DesktopColor [get, set]
 Gets or sets the color of the desktop. More...
 
bool ShowScrollbars [get, set]
 Gets or sets a value indicating whether the scrollbars are visilbe. More...
 
bool ShowPage [get, set]
 Gets or sets a value indicating whether the page is visilbe. More...
 
XSize PageSize [get, set]
 Gets or sets the page size in point. More...
 
Size PageSizeF [get, set]
 This is a hack for Visual Studio 2008. The designer uses reflection for setting the PageSize property. This fails, even an implicit operator that converts Size to XSize exits. More...
 

Events

EventHandler ZoomChanged
 Occurs when the zoom factor changed. More...
 

Detailed Description

Represents a preview control for an XGraphics page. Can be used as an alternative to System.Windows.Forms.PrintPreviewControl.

Constructor & Destructor Documentation

◆ PagePreview()

PdfSharp.Forms.PagePreview.PagePreview ( )

Initializes a new instance of the PagePreview class.

Member Function Documentation

◆ Dispose()

override void PdfSharp.Forms.PagePreview.Dispose ( bool  disposing)
protected

Clean up any resources being used.

◆ OnInvalidated()

override void PdfSharp.Forms.PagePreview.OnInvalidated ( InvalidateEventArgs  e)
protected

Invalidates the canvas.

◆ OnLayout()

override void PdfSharp.Forms.PagePreview.OnLayout ( LayoutEventArgs  levent)
protected

Layouts the child controls.

◆ OnPaintBackground()

override void PdfSharp.Forms.PagePreview.OnPaintBackground ( PaintEventArgs  e)
protected

Paints the background with the sheet of paper.

◆ OnSizeChanged()

override void PdfSharp.Forms.PagePreview.OnSizeChanged ( EventArgs  e)
protected

Recalculates the preview dimension.

◆ OnZoomChanged()

virtual void PdfSharp.Forms.PagePreview.OnZoomChanged ( EventArgs  e)
protectedvirtual

Raises the ZoomChanged event when the zoom factor changed.

◆ RenderEvent()

delegate void PdfSharp.Forms.PagePreview.RenderEvent ( XGraphics  gfx)

A delegate for invoking the render function.

◆ SetRenderEvent()

void PdfSharp.Forms.PagePreview.SetRenderEvent ( RenderEvent  renderEvent)

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

Property Documentation

◆ BorderStyle

new BorderStyle PdfSharp.Forms.PagePreview.BorderStyle
getset

Gets or sets the border style of the control.

◆ DesktopColor

Color PdfSharp.Forms.PagePreview.DesktopColor
getset

Gets or sets the color of the desktop.

◆ PageColor

Color PdfSharp.Forms.PagePreview.PageColor
getset

Gets or sets the color of the page.

◆ PageSize

XSize PdfSharp.Forms.PagePreview.PageSize
getset

Gets or sets the page size in point.

◆ PageSizeF

Size PdfSharp.Forms.PagePreview.PageSizeF
getset

This is a hack for Visual Studio 2008. The designer uses reflection for setting the PageSize property. This fails, even an implicit operator that converts Size to XSize exits.

◆ ShowPage

bool PdfSharp.Forms.PagePreview.ShowPage
getset

Gets or sets a value indicating whether the page is visilbe.

◆ ShowScrollbars

bool PdfSharp.Forms.PagePreview.ShowScrollbars
getset

Gets or sets a value indicating whether the scrollbars are visilbe.

◆ Zoom

Zoom PdfSharp.Forms.PagePreview.Zoom
getset

Gets or sets a predefined zoom factor.

◆ ZoomPercent

int PdfSharp.Forms.PagePreview.ZoomPercent
getset

Gets or sets an arbitrary zoom factor. The range is from 10 to 800.

Event Documentation

◆ ZoomChanged

EventHandler PdfSharp.Forms.PagePreview.ZoomChanged

Occurs when the zoom factor changed.


The documentation for this class was generated from the following file: