C# Class Patagames.Pdf.Net.Controls.Wpf.PdfViewer

Represents a pdf view control for displaying an Pdf document.
Inheritance: System.Windows.Controls.Control, IScrollInfo
Show file Open project: Patagames/Pdf.Wpf

Public Properties

Property Type Description
CurrentPageHighlightColorProperty System.Windows.DependencyProperty
DocumentProperty System.Windows.DependencyProperty
FormHighlightColorProperty System.Windows.DependencyProperty
LoadingIconTextProperty System.Windows.DependencyProperty
MouseModeProperty DependencyProperty
PaddingProperty DependencyProperty
PageBackColorProperty DependencyProperty
PageBorderColorProperty DependencyProperty
PageHAlignProperty DependencyProperty
PageMarginProperty DependencyProperty
PageSeparatorColorProperty DependencyProperty
PageVAlignProperty DependencyProperty
RenderFlagsProperty DependencyProperty
SelectedTextProperty DependencyProperty
ShowCurrentPageHighlightProperty DependencyProperty
ShowLoadingIconProperty DependencyProperty
ShowPageSeparatorProperty DependencyProperty
SizeModeProperty DependencyProperty
TextSelectColorProperty DependencyProperty
TilesCountProperty DependencyProperty
UseProgressiveRenderProperty DependencyProperty
ViewModeProperty DependencyProperty
ZoomProperty DependencyProperty

Private Properties

Property Type Description
CalcAndSetCurrentPage void
CalcAppropriateSize System.Windows.Size
CalcCurrentPage int
CalcHorizontal System.Windows.Size
CalcIntersectEntries bool
CalcPageSeparator void
CalcPages System.Windows.Size
CalcSingle System.Windows.Size
CalcTilesVertical System.Windows.Size
CalcTilesVerticalNoChangeSize System.Windows.Size
CalcVertical System.Windows.Size
CaptureFillForms CaptureInfo
DeviceToPage int
DrawCanvasToContext bool
FormsAppBeep void
FormsDoGotoAction void
FormsDoNamedAction void
FormsGotoPage void
FormsInvalidate void
FormsOutputSelectedRect void
FormsSetCursor void
GenerateSelectedTextProperty void
GetRenderLocation Point
GetRenderRect System.Windows.Rect
GetRenderSize System.Windows.Size
GetWord bool
NormalizeSelectionInfo SelectInfo
PageRotation PageRotate
PageToDevice Point
Pages_CurrentPageChanged void
Pages_PageDeleted void
Pages_PageInserted void
Pages_ProgressiveRender void
PriocessMouseUpForDefaultTool void
ProcessAction void
ProcessDestination void
ProcessLinkClicked void
ProcessMouseDoubleClickForSelectTextTool void
ProcessMouseDownDefaultTool void
ProcessMouseDownForSelectTextTool void
ProcessMouseDownPanTool void
ProcessMouseMoveForDefaultTool void
ProcessMouseMoveForPanTool void
ProcessMouseMoveForSelectTextTool void
ProcessMouseUpPanTool void
ReleaseFillForms void
SetCurrentPage void
StartInvalidateTimer void
renderRects Rect

Public Methods

Method Description
CalcActualRect ( int index ) : Rect

Calculates the actual rectangle of the specified page in client coordinates

ClearRenderBuffer ( ) : void

Clear internal render buffer for rerender pages in Progressive mode

ClientToPage ( int pageIndex, Point pt ) : Point

Computes the location of the specified client point into page coordinates.

Permitted range of pages depends on the current view type and on some other parameters in the control.

CloseDocument ( ) : void

Close a loaded PDF document.

DeselectText ( ) : void

Clear text selection

HighlightText ( int pageIndex, HighlightInfo highlightInfo ) : void

Highlight text on the page

HighlightText ( int pageIndex, int charIndex, int charsCount, Color color ) : void

Highlight text on the page

HilightSelectedText ( Color color ) : void

Highlight selected text on the page by specified color

LineDown ( ) : void

Scrolls down within content by one logical unit.

LineLeft ( ) : void

Scrolls left within content by one logical unit.

LineRight ( ) : void

Scrolls right within content by one logical unit.

LineUp ( ) : void

Scrolls up within content by one logical unit.

LoadDocument ( Stream stream, string password = null ) : void

Loads the PDF document from the specified stream.

The application should maintain the stream resources being valid until the PDF document close.

With the trial version the documents which size is smaller than 1024 Kb, or greater than 10 Mb can be loaded without any restrictions. For other documents the allowed ranges is 1.5 - 2 Mb; 2.5 - 3 Mb; 3.5 - 4 Mb; 4.5 - 5 Mb and so on.

LoadDocument ( byte pdf, string password = null ) : void

Loads the PDF document from the specified byte array.

The application should maintain the byte array being valid until the PDF document close.

With the trial version the documents which size is smaller than 1024 Kb, or greater than 10 Mb can be loaded without any restrictions. For other documents the allowed ranges is 1.5 - 2 Mb; 2.5 - 3 Mb; 3.5 - 4 Mb; 4.5 - 5 Mb and so on.

LoadDocument ( string path, string password = null ) : void

Open and load a PDF document from a file.

With the trial version the documents which size is smaller than 1024 Kb, or greater than 10 Mb can be loaded without any restrictions. For other documents the allowed ranges is 1.5 - 2 Mb; 2.5 - 3 Mb; 3.5 - 4 Mb; 4.5 - 5 Mb and so on.

MakeVisible ( Visual visual, Rect rectangle ) : Rect

Forces content to scroll until the coordinate space of a Visual object is visible.

In most cases, the returned rectangle is a transformed version of the input rectangle. In some cases, such as when the input rectangle cannot fit entirely within the viewport, the return value may be smaller.

MouseWheelDown ( ) : void

Scrolls down within content after a user clicks the wheel button on a mouse.

MouseWheelLeft ( ) : void

Scrolls left within content after a user clicks the wheel button on a mouse.

MouseWheelRight ( ) : void

Scrolls right within content after a user clicks the wheel button on a mouse.

MouseWheelUp ( ) : void

Scrolls up within content after a user clicks the wheel button on a mouse.

PageDown ( ) : void

Scrolls down within content by one page.

PageLeft ( ) : void

Scrolls left within content by one page.

PageRight ( ) : void

Scrolls right within content by one page.

PageToClient ( int pageIndex, Point pt ) : Point

Computes the location of the specified page point into client coordinates.

Permitted range of pages depends on the current view type and on some other parameters in the control.

PageUp ( ) : void

Scrolls up within content by one page.

PdfViewer ( ) : Patagames.Pdf.Enums

Initializes a new instance of the PdfViewer class.

PointInPage ( Point pt ) : int

Determines if the specified point is contained within Pdf page.

RemoveHighlightFromText ( ) : void

Removes highlight from the text

RemoveHighlightFromText ( int pageIndex, int charIndex, int charsCount ) : void

Removes highlight from the text

RemoveHilightFromSelectedText ( ) : void

Removes highlight from selected text

RotatePage ( int pageIndex, PageRotate angle ) : void

Rotates the specified page to the specified angle.

The PDF page rotates clockwise. See PageRotate for details.

ScrollToChar ( int charIndex ) : void

Scrolls the control view to the specified character on the current page

ScrollToChar ( int pageIndex, int charIndex ) : void

Scrolls the control view to the specified character on the specified page

ScrollToPage ( int index ) : void

Scrolls the control view to the specified page.

ScrollToPoint ( int pageIndex, Point pagePoint ) : void

Scrolls the control view to the specified point on the specified page

SelectText ( SelectInfo SelInfo ) : void

Selects the text contained in specified pages.

SelectText ( int startPage, int startIndex, int endPage, int endIndex ) : void

Selects the text contained in specified pages.

SetHorizontalOffset ( double offset ) : void

Sets the amount of horizontal offset.

SetVerticalOffset ( double offset ) : void

Sets the amount of vertical offset.

UpdateDocLayout ( ) : void

Ensures that all sizes and positions of pages of a PdfViewer control are properly updated for layout.

Protected Methods

Method Description
DrawCurrentPageHighlight ( System.Windows.Media.DrawingContext drawingContext, int pageIndex, Rect actualRect ) : void

Draws current page highlight

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

DrawFillForms ( PdfBitmap bmp, PdfPage page, Rect actualRect ) : void

Draw fill forms

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

DrawFillFormsSelection ( System.Windows.Media.DrawingContext drawingContext ) : void

Draws highlights inside a forms

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

DrawLoadingIcon ( System.Windows.Media.DrawingContext drawingContext, PdfPage page, Rect actualRect ) : void

Draw loading icon

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

DrawPage ( System.Windows.Media.DrawingContext drawingContext, PdfPage page, Rect actualRect ) : bool

Draws page content and fillforms

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

DrawPageBackColor ( System.Windows.Media.DrawingContext drawingContext, double x, double y, double width, double height ) : void

Draws page background

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

DrawPageBorder ( System.Windows.Media.DrawingContext drawingContext, Rect BBox ) : void

Draws page's border

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

DrawPageSeparators ( System.Windows.Media.DrawingContext drawingContext, List &separator ) : void

Draws pages separatoes.

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

DrawTextHighlight ( System.Windows.Media.DrawingContext drawingContext, List entries, int pageIndex ) : void

Draws text highlights

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

DrawTextSelection ( System.Windows.Media.DrawingContext drawingContext, SelectInfo selInfo, int pageIndex ) : void

Draws text selection

Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators

OnAfterDocumentChanged ( EventArgs e ) : void

Raises the AfterDocumentChanged event.

OnAfterLinkClicked ( PdfAfterLinkClickedEventArgs e ) : void

Raises the AfterLinkClicked event.

OnBeforeDocumentChanged ( DocumentClosingEventArgs e ) : bool

Raises the BeforeDocumentChanged event.

OnBeforeLinkClicked ( PdfBeforeLinkClickedEventArgs e ) : void

Raises the BeforeLinkClicked event.

OnCurrentPageChanged ( EventArgs e ) : void

Raises the CurrentPageChanged event.

OnCurrentPageHighlightColorChanged ( EventArgs e ) : void

Raises the CurrentPageHighlightColorChanged event.

OnDocumentClosed ( EventArgs e ) : void

Raises the DocumentClosed event.

OnDocumentClosing ( DocumentClosingEventArgs e ) : bool

Raises the DocumentClosing event.

OnDocumentLoaded ( EventArgs e ) : void

Raises the DocumentLoaded event.

OnFormHighlightColorChanged ( EventArgs e ) : void

Raises the FormHighlightColorChanged event.

OnFormsAppBeep ( EventArgs e ) : void

Called by the engine when it is required to play the sound

OnFormsDoGotoAction ( DoGotoActionEventArgs e ) : void

Called by the engine when it is required to execute a GoTo action

OnFormsDoNamedAction ( EventArgs e ) : void

Called by the engine when it is required to execute a named action

OnFormsGotoPage ( EventArgs e ) : void

Called by the engine when it is required to execute GoTo operation

OnFormsInvalidate ( InvalidatePageEventArgs e ) : void

Called by the engine when it is required to redraw the page

OnFormsOutputSelectedRect ( InvalidatePageEventArgs e ) : void

Called by the engine when it is required to draw selected regions in FillForms

OnFormsSetCursor ( SetCursorEventArgs e ) : void

Called by the engine when it is required to change the cursor

OnHighlightedTextChanged ( EventArgs e ) : void

Raises the HighlightedTextChanged event.

OnKeyUp ( KeyEventArgs e ) : void

Raises the System.Windows.Forms.Control.KeyUp event.

OnLoadingIconTextChanged ( EventArgs e ) : void

Raises the LoadingIconTextChanged event.

OnMouseDoubleClick ( MouseButtonEventArgs e ) : void

Raises the MouseDoubleClick event.

OnMouseDown ( MouseButtonEventArgs e ) : void

Raises the System.Windows.Forms.Control.MouseDown event.

OnMouseLeave ( MouseEventArgs e ) : void

Invoked when an unhandled System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.

OnMouseModeChanged ( EventArgs e ) : void

Raises the MouseModeChanged event.

OnMouseMove ( MouseEventArgs e ) : void

Raises the System.Windows.Forms.Control.MouseMove event.

OnMouseUp ( MouseButtonEventArgs e ) : void

Raises the System.Windows.Forms.Control.MouseUp event.

OnPageAlignChanged ( EventArgs e ) : void

Raises the PageAlignChanged event.

OnPageBackColorChanged ( EventArgs e ) : void

Raises the PageBackColorChanged event.

OnPageBorderColorChanged ( EventArgs e ) : void

Raises the PageBorderColorChanged event.

OnPageMarginChanged ( EventArgs e ) : void

Raises the PageMarginChanged event.

OnPageSeparatorColorChanged ( EventArgs e ) : void

Raises the PageSeparatorColorChanged event.

OnPreviewKeyDown ( KeyEventArgs e ) : void

Invoked when an unhandled System.Windows.Input.Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnRender ( DrawingContext drawingContext ) : void

When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.

The OnRender method can be overridden to add further graphical elements (not previously defined in a logical tree) to a rendered element, such as effects or adorners. A DrawingContext object is passed as an argument, which provides methods for drawing shapes, text, images or videos.

OnRenderFlagsChanged ( EventArgs e ) : void

Raises the RenderFlagsChanged event.

OnRenderSizeChanged ( SizeChangedInfo sizeInfo ) : void

Raises the System.Windows.FrameworkElement.SizeChanged event, using the specified information as part of the eventual event data.

OnSelectionChanged ( EventArgs e ) : void

Raises the SelectionChanged event.

OnShowCurrentPageHighlightChanged ( EventArgs e ) : void

Raises the ShowCurrentPageHighlightChanged event.

OnShowLoadingIconChanged ( EventArgs e ) : void

Raises the ShowLoadingIconChanged event.

OnShowPageSeparatorChanged ( EventArgs e ) : void

Raises the ShowPageSeparatorChanged event.

OnSizeModeChanged ( EventArgs e ) : void

Raises the SizeModeChanged event.

OnTextSelectColorChanged ( EventArgs e ) : void

Raises the TextSelectColorChanged event.

OnTilesCountChanged ( EventArgs e ) : void

Raises the TilesCountChanged event.

OnUseProgressiveRenderChanged ( EventArgs e ) : void

Raises the UseProgressiveRenderChanged event.

OnViewModeChanged ( EventArgs e ) : void

Raises the ViewModeChanged event.

OnZoomChanged ( EventArgs e ) : void

Raises the ZoomChanged event.

Private Methods

Method Description
CalcAndSetCurrentPage ( ) : void
CalcAppropriateSize ( double w, double h, double fitWidth, double fitHeight ) : Size
CalcCurrentPage ( ) : int
CalcHorizontal ( ) : Size
CalcIntersectEntries ( HighlightInfo existEntry, HighlightInfo addingEntry, List &calcEntries ) : bool
CalcPageSeparator ( Rect actualRect, int pageIndex, List &separator ) : void
CalcPages ( ) : Size
CalcSingle ( ) : Size
CalcTilesVertical ( ) : Size
CalcTilesVerticalNoChangeSize ( ) : Size
CalcVertical ( ) : Size
CaptureFillForms ( PdfForms fillForms ) : CaptureInfo
DeviceToPage ( double x, double y, Point &pagePoint ) : int
DrawCanvasToContext ( System.Windows.Media.DrawingContext drawingContext, int cw, int ch, bool allPagesAreRendered ) : bool
FormsAppBeep ( object sender, EventArgs e ) : void
FormsDoGotoAction ( object sender, DoGotoActionEventArgs e ) : void
FormsDoNamedAction ( object sender, EventArgs e ) : void
FormsGotoPage ( object sender, EventArgs e ) : void
FormsInvalidate ( object sender, InvalidatePageEventArgs e ) : void
FormsOutputSelectedRect ( object sender, InvalidatePageEventArgs e ) : void
FormsSetCursor ( object sender, SetCursorEventArgs e ) : void
GenerateSelectedTextProperty ( ) : void
GetRenderLocation ( Size size ) : Point
GetRenderRect ( int index ) : Rect
GetRenderSize ( int index ) : Size
GetWord ( PdfText text, int ci, int &si, int &ei ) : bool
NormalizeSelectionInfo ( ) : SelectInfo
PageRotation ( PdfPage pdfPage ) : PageRotate
PageToDevice ( double x, double y, int pageIndex ) : Point
Pages_CurrentPageChanged ( object sender, EventArgs e ) : void
Pages_PageDeleted ( object sender, PageCollectionChangedEventArgs e ) : void
Pages_PageInserted ( object sender, PageCollectionChangedEventArgs e ) : void
Pages_ProgressiveRender ( object sender, ProgressiveRenderEventArgs e ) : void
PriocessMouseUpForDefaultTool ( Point page_point, int page_index ) : void
ProcessAction ( PdfAction pdfAction ) : void
ProcessDestination ( PdfDestination pdfDestination ) : void
ProcessLinkClicked ( PdfLink pdfLink, PdfWebLink webLink ) : void
ProcessMouseDoubleClickForSelectTextTool ( Point page_point, int page_index ) : void
ProcessMouseDownDefaultTool ( Point page_point, int page_index ) : void
ProcessMouseDownForSelectTextTool ( Point page_point, int page_index ) : void
ProcessMouseDownPanTool ( Point mouse_point ) : void
ProcessMouseMoveForDefaultTool ( Point page_point, int page_index ) : void
ProcessMouseMoveForPanTool ( Point mouse_point ) : void
ProcessMouseMoveForSelectTextTool ( int page_index, int character_index ) : void
ProcessMouseUpPanTool ( Point mouse_point ) : void
ReleaseFillForms ( CaptureInfo captureInfo ) : void
SetCurrentPage ( int index ) : void
StartInvalidateTimer ( ) : void
renderRects ( int index ) : Rect

Method Details

CalcActualRect() public method

Calculates the actual rectangle of the specified page in client coordinates
public CalcActualRect ( int index ) : Rect
index int Zero-based page index
return System.Windows.Rect

ClearRenderBuffer() public method

Clear internal render buffer for rerender pages in Progressive mode
public ClearRenderBuffer ( ) : void
return void

ClientToPage() public method

Computes the location of the specified client point into page coordinates.
Permitted range of pages depends on the current view type and on some other parameters in the control.
The page index is out of range
public ClientToPage ( int pageIndex, Point pt ) : Point
pageIndex int Page index. Can be obtained by method.
pt Point The client coordinate Point to convert.
return Point

CloseDocument() public method

Close a loaded PDF document.
public CloseDocument ( ) : void
return void

DeselectText() public method

Clear text selection
public DeselectText ( ) : void
return void

DrawCurrentPageHighlight() protected method

Draws current page highlight
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawCurrentPageHighlight ( System.Windows.Media.DrawingContext drawingContext, int pageIndex, Rect actualRect ) : void
drawingContext System.Windows.Media.DrawingContext The drawing instructions for a specific element. This context is provided to the layout system.
pageIndex int Page index to be drawn
actualRect System.Windows.Rect Page bounds in control coordinates
return void

DrawFillForms() protected method

Draw fill forms
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawFillForms ( PdfBitmap bmp, PdfPage page, Rect actualRect ) : void
bmp PdfBitmap object
page PdfPage Page to be drawn
actualRect System.Windows.Rect Page bounds in control coordinates
return void

DrawFillFormsSelection() protected method

Draws highlights inside a forms
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawFillFormsSelection ( System.Windows.Media.DrawingContext drawingContext ) : void
drawingContext System.Windows.Media.DrawingContext The drawing instructions for a specific element. This context is provided to the layout system.
return void

DrawLoadingIcon() protected method

Draw loading icon
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawLoadingIcon ( System.Windows.Media.DrawingContext drawingContext, PdfPage page, Rect actualRect ) : void
drawingContext System.Windows.Media.DrawingContext Drawing surface
page PdfPage Page to be drawn
actualRect System.Windows.Rect Page bounds in control coordinates
return void

DrawPage() protected method

Draws page content and fillforms
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawPage ( System.Windows.Media.DrawingContext drawingContext, PdfPage page, Rect actualRect ) : bool
drawingContext System.Windows.Media.DrawingContext The drawing instructions for a specific element. This context is provided to the layout system.
page PdfPage Page to be drawn
actualRect System.Windows.Rect Page bounds in control coordinates
return bool

DrawPageBackColor() protected method

Draws page background
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawPageBackColor ( System.Windows.Media.DrawingContext drawingContext, double x, double y, double width, double height ) : void
drawingContext System.Windows.Media.DrawingContext Drawing surface
x double Actual X position of the page
y double Actual Y position of the page
width double Actual width of the page
height double Actual height of the page
return void

DrawPageBorder() protected method

Draws page's border
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawPageBorder ( System.Windows.Media.DrawingContext drawingContext, Rect BBox ) : void
drawingContext System.Windows.Media.DrawingContext The drawing surface
BBox System.Windows.Rect Page's bounding box
return void

DrawPageSeparators() protected method

Draws pages separatoes.
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawPageSeparators ( System.Windows.Media.DrawingContext drawingContext, List &separator ) : void
drawingContext System.Windows.Media.DrawingContext The drawing instructions for a specific element. This context is provided to the layout system.
separator List List of pair of points what represents separator
return void

DrawTextHighlight() protected method

Draws text highlights
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawTextHighlight ( System.Windows.Media.DrawingContext drawingContext, List entries, int pageIndex ) : void
drawingContext System.Windows.Media.DrawingContext The drawing instructions for a specific element. This context is provided to the layout system.
entries List Highlights info.
pageIndex int Page index to be drawn
return void

DrawTextSelection() protected method

Draws text selection
Full page rendering is performed in the following order: DrawPageBackColor DrawPage / DrawLoadingIcon DrawFillForms DrawPageBorder DrawFillFormsSelection DrawTextHighlight DrawTextSelection DrawCurrentPageHighlight DrawPageSeparators
protected DrawTextSelection ( System.Windows.Media.DrawingContext drawingContext, SelectInfo selInfo, int pageIndex ) : void
drawingContext System.Windows.Media.DrawingContext The drawing instructions for a specific element. This context is provided to the layout system.
selInfo SelectInfo Selection info
pageIndex int Page index to be drawn
return void

HighlightText() public method

Highlight text on the page
public HighlightText ( int pageIndex, HighlightInfo highlightInfo ) : void
pageIndex int Zero-based index of the page
highlightInfo HighlightInfo Sets the options for highlighting text
return void

HighlightText() public method

Highlight text on the page
public HighlightText ( int pageIndex, int charIndex, int charsCount, Color color ) : void
pageIndex int Zero-based index of the page
charIndex int Zero-based char index on the page.
charsCount int The number of highlighted characters on the page or -1 for highlight text from charIndex to end of the page.
color Color Highlight color
return void

HilightSelectedText() public method

Highlight selected text on the page by specified color
public HilightSelectedText ( Color color ) : void
color Color Highlight color
return void

LineDown() public method

Scrolls down within content by one logical unit.
public LineDown ( ) : void
return void

LineLeft() public method

Scrolls left within content by one logical unit.
public LineLeft ( ) : void
return void

LineRight() public method

Scrolls right within content by one logical unit.
public LineRight ( ) : void
return void

LineUp() public method

Scrolls up within content by one logical unit.
public LineUp ( ) : void
return void

LoadDocument() public method

Loads the PDF document from the specified stream.

The application should maintain the stream resources being valid until the PDF document close.

With the trial version the documents which size is smaller than 1024 Kb, or greater than 10 Mb can be loaded without any restrictions. For other documents the allowed ranges is 1.5 - 2 Mb; 2.5 - 3 Mb; 3.5 - 4 Mb; 4.5 - 5 Mb and so on.

unknown error file not found or could not be opened file not in PDF format or corrupted password required or incorrect password unsupported security scheme Error occured in PDFium. See ErrorCode for detail This exception thrown only in trial mode if document cannot be opened due to a license restrictions"
public LoadDocument ( Stream stream, string password = null ) : void
stream Stream The stream containing the PDF document to load. The stream must support seeking.
password string A string used as the password for PDF file. If no password needed, empty or NULL can be used.
return void

LoadDocument() public method

Loads the PDF document from the specified byte array.

The application should maintain the byte array being valid until the PDF document close.

With the trial version the documents which size is smaller than 1024 Kb, or greater than 10 Mb can be loaded without any restrictions. For other documents the allowed ranges is 1.5 - 2 Mb; 2.5 - 3 Mb; 3.5 - 4 Mb; 4.5 - 5 Mb and so on.

unknown error file not found or could not be opened file not in PDF format or corrupted password required or incorrect password unsupported security scheme Error occured in PDFium. See ErrorCode for detail This exception thrown only in trial mode if document cannot be opened due to a license restrictions"
public LoadDocument ( byte pdf, string password = null ) : void
pdf byte The byte array containing the PDF document to load.
password string A string used as the password for PDF file. If no password needed, empty or NULL can be used.
return void

LoadDocument() public method

Open and load a PDF document from a file.
With the trial version the documents which size is smaller than 1024 Kb, or greater than 10 Mb can be loaded without any restrictions. For other documents the allowed ranges is 1.5 - 2 Mb; 2.5 - 3 Mb; 3.5 - 4 Mb; 4.5 - 5 Mb and so on.
unknown error file not found or could not be opened file not in PDF format or corrupted password required or incorrect password unsupported security scheme Error occured in PDFium. See ErrorCode for detail This exception thrown only in trial mode if document cannot be opened due to a license restrictions"
public LoadDocument ( string path, string password = null ) : void
path string Path to the PDF file (including extension)
password string A string used as the password for PDF file. If no password needed, empty or NULL can be used.
return void

MakeVisible() public method

Forces content to scroll until the coordinate space of a Visual object is visible.
In most cases, the returned rectangle is a transformed version of the input rectangle. In some cases, such as when the input rectangle cannot fit entirely within the viewport, the return value may be smaller.
public MakeVisible ( Visual visual, Rect rectangle ) : Rect
visual Visual A Visual that becomes visible.
rectangle Rect A bounding rectangle that identifies the coordinate space to make visible.
return Rect

MouseWheelDown() public method

Scrolls down within content after a user clicks the wheel button on a mouse.
public MouseWheelDown ( ) : void
return void

MouseWheelLeft() public method

Scrolls left within content after a user clicks the wheel button on a mouse.
public MouseWheelLeft ( ) : void
return void

MouseWheelRight() public method

Scrolls right within content after a user clicks the wheel button on a mouse.
public MouseWheelRight ( ) : void
return void

MouseWheelUp() public method

Scrolls up within content after a user clicks the wheel button on a mouse.
public MouseWheelUp ( ) : void
return void

OnAfterDocumentChanged() protected method

Raises the AfterDocumentChanged event.
protected OnAfterDocumentChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnAfterLinkClicked() protected method

Raises the AfterLinkClicked event.
protected OnAfterLinkClicked ( PdfAfterLinkClickedEventArgs e ) : void
e PdfAfterLinkClickedEventArgs An PdfAfterLinkClickedEventArgs that contains the event data.
return void

OnBeforeDocumentChanged() protected method

Raises the BeforeDocumentChanged event.
protected OnBeforeDocumentChanged ( DocumentClosingEventArgs e ) : bool
e DocumentClosingEventArgs An System.EventArgs that contains the event data.
return bool

OnBeforeLinkClicked() protected method

Raises the BeforeLinkClicked event.
protected OnBeforeLinkClicked ( PdfBeforeLinkClickedEventArgs e ) : void
e PdfBeforeLinkClickedEventArgs An PdfBeforeLinkClickedEventArgs that contains the event data.
return void

OnCurrentPageChanged() protected method

Raises the CurrentPageChanged event.
protected OnCurrentPageChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnCurrentPageHighlightColorChanged() protected method

Raises the CurrentPageHighlightColorChanged event.
protected OnCurrentPageHighlightColorChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnDocumentClosed() protected method

Raises the DocumentClosed event.
protected OnDocumentClosed ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnDocumentClosing() protected method

Raises the DocumentClosing event.
protected OnDocumentClosing ( DocumentClosingEventArgs e ) : bool
e DocumentClosingEventArgs An System.EventArgs that contains the event data.
return bool

OnDocumentLoaded() protected method

Raises the DocumentLoaded event.
protected OnDocumentLoaded ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnFormHighlightColorChanged() protected method

Raises the FormHighlightColorChanged event.
protected OnFormHighlightColorChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnFormsAppBeep() protected method

Called by the engine when it is required to play the sound
protected OnFormsAppBeep ( EventArgs e ) : void
e EventArgs An EventArgs that contains the event data.
return void

OnFormsDoGotoAction() protected method

Called by the engine when it is required to execute a GoTo action
protected OnFormsDoGotoAction ( DoGotoActionEventArgs e ) : void
e DoGotoActionEventArgs An that contains the event data.
return void

OnFormsDoNamedAction() protected method

Called by the engine when it is required to execute a named action
protected OnFormsDoNamedAction ( EventArgs e ) : void
e EventArgs An EventArgs that contains the event data.
return void

OnFormsGotoPage() protected method

Called by the engine when it is required to execute GoTo operation
protected OnFormsGotoPage ( EventArgs e ) : void
e EventArgs An EventArgs that contains the event data.
return void

OnFormsInvalidate() protected method

Called by the engine when it is required to redraw the page
protected OnFormsInvalidate ( InvalidatePageEventArgs e ) : void
e InvalidatePageEventArgs An that contains the event data.
return void

OnFormsOutputSelectedRect() protected method

Called by the engine when it is required to draw selected regions in FillForms
protected OnFormsOutputSelectedRect ( InvalidatePageEventArgs e ) : void
e InvalidatePageEventArgs An that contains the event data.
return void

OnFormsSetCursor() protected method

Called by the engine when it is required to change the cursor
protected OnFormsSetCursor ( SetCursorEventArgs e ) : void
e SetCursorEventArgs An that contains the event data.
return void

OnHighlightedTextChanged() protected method

Raises the HighlightedTextChanged event.
protected OnHighlightedTextChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnKeyUp() protected method

Raises the System.Windows.Forms.Control.KeyUp event.
protected OnKeyUp ( KeyEventArgs e ) : void
e KeyEventArgs A System.Windows.Forms.KeyEventArgs that contains the event data.
return void

OnLoadingIconTextChanged() protected method

Raises the LoadingIconTextChanged event.
protected OnLoadingIconTextChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnMouseDoubleClick() protected method

Raises the MouseDoubleClick event.
protected OnMouseDoubleClick ( MouseButtonEventArgs e ) : void
e MouseButtonEventArgs A System.Windows.Forms.MouseButtonEventArgs that contains the event data.
return void

OnMouseDown() protected method

Raises the System.Windows.Forms.Control.MouseDown event.
protected OnMouseDown ( MouseButtonEventArgs e ) : void
e MouseButtonEventArgs A System.Windows.Forms.MouseEventArgs that contains the event data.
return void

OnMouseLeave() protected method

Invoked when an unhandled System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.
protected OnMouseLeave ( MouseEventArgs e ) : void
e MouseEventArgs The System.Windows.Input.MouseEventArgs that contains the event data.
return void

OnMouseModeChanged() protected method

Raises the MouseModeChanged event.
protected OnMouseModeChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnMouseMove() protected method

Raises the System.Windows.Forms.Control.MouseMove event.
protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs A System.Windows.Forms.MouseEventArgs that contains the event data.
return void

OnMouseUp() protected method

Raises the System.Windows.Forms.Control.MouseUp event.
protected OnMouseUp ( MouseButtonEventArgs e ) : void
e MouseButtonEventArgs A System.Windows.Forms.MouseEventArgs that contains the event data.
return void

OnPageAlignChanged() protected method

Raises the PageAlignChanged event.
protected OnPageAlignChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnPageBackColorChanged() protected method

Raises the PageBackColorChanged event.
protected OnPageBackColorChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnPageBorderColorChanged() protected method

Raises the PageBorderColorChanged event.
protected OnPageBorderColorChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnPageMarginChanged() protected method

Raises the PageMarginChanged event.
protected OnPageMarginChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnPageSeparatorColorChanged() protected method

Raises the PageSeparatorColorChanged event.
protected OnPageSeparatorColorChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnPreviewKeyDown() protected method

Invoked when an unhandled System.Windows.Input.Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnPreviewKeyDown ( KeyEventArgs e ) : void
e KeyEventArgs The System.Windows.Input.KeyEventArgs that contains the event data.
return void

OnRender() protected method

When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
The OnRender method can be overridden to add further graphical elements (not previously defined in a logical tree) to a rendered element, such as effects or adorners. A DrawingContext object is passed as an argument, which provides methods for drawing shapes, text, images or videos.
protected OnRender ( DrawingContext drawingContext ) : void
drawingContext DrawingContext The drawing instructions for a specific element. This context is provided to the layout system.
return void

OnRenderFlagsChanged() protected method

Raises the RenderFlagsChanged event.
protected OnRenderFlagsChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnRenderSizeChanged() protected method

Raises the System.Windows.FrameworkElement.SizeChanged event, using the specified information as part of the eventual event data.
protected OnRenderSizeChanged ( SizeChangedInfo sizeInfo ) : void
sizeInfo SizeChangedInfo Details of the old and new size involved in the change.
return void

OnSelectionChanged() protected method

Raises the SelectionChanged event.
protected OnSelectionChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnShowCurrentPageHighlightChanged() protected method

Raises the ShowCurrentPageHighlightChanged event.
protected OnShowCurrentPageHighlightChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnShowLoadingIconChanged() protected method

Raises the ShowLoadingIconChanged event.
protected OnShowLoadingIconChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnShowPageSeparatorChanged() protected method

Raises the ShowPageSeparatorChanged event.
protected OnShowPageSeparatorChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnSizeModeChanged() protected method

Raises the SizeModeChanged event.
protected OnSizeModeChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnTextSelectColorChanged() protected method

Raises the TextSelectColorChanged event.
protected OnTextSelectColorChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnTilesCountChanged() protected method

Raises the TilesCountChanged event.
protected OnTilesCountChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnUseProgressiveRenderChanged() protected method

Raises the UseProgressiveRenderChanged event.
protected OnUseProgressiveRenderChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnViewModeChanged() protected method

Raises the ViewModeChanged event.
protected OnViewModeChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

OnZoomChanged() protected method

Raises the ZoomChanged event.
protected OnZoomChanged ( EventArgs e ) : void
e EventArgs An System.EventArgs that contains the event data.
return void

PageDown() public method

Scrolls down within content by one page.
public PageDown ( ) : void
return void

PageLeft() public method

Scrolls left within content by one page.
public PageLeft ( ) : void
return void

PageRight() public method

Scrolls right within content by one page.
public PageRight ( ) : void
return void

PageToClient() public method

Computes the location of the specified page point into client coordinates.
Permitted range of pages depends on the current view type and on some other parameters in the control.
The page index is out of range
public PageToClient ( int pageIndex, Point pt ) : Point
pageIndex int Page index. Can be obtained by method.
pt Point The page coordinate Point to convert.
return Point

PageUp() public method

Scrolls up within content by one page.
public PageUp ( ) : void
return void

PdfViewer() public method

Initializes a new instance of the PdfViewer class.
public PdfViewer ( ) : Patagames.Pdf.Enums
return Patagames.Pdf.Enums

PointInPage() public method

Determines if the specified point is contained within Pdf page.
public PointInPage ( Point pt ) : int
pt Point The System.Drawing.Point to test.
return int

RemoveHighlightFromText() public method

Removes highlight from the text
public RemoveHighlightFromText ( ) : void
return void

RemoveHighlightFromText() public method

Removes highlight from the text
public RemoveHighlightFromText ( int pageIndex, int charIndex, int charsCount ) : void
pageIndex int Zero-based index of the page
charIndex int Zero-based char index on the page.
charsCount int The number of highlighted characters on the page or -1 for highlight text from charIndex to end of the page.
return void

RemoveHilightFromSelectedText() public method

Removes highlight from selected text
public RemoveHilightFromSelectedText ( ) : void
return void

RotatePage() public method

Rotates the specified page to the specified angle.
The PDF page rotates clockwise. See PageRotate for details.
public RotatePage ( int pageIndex, PageRotate angle ) : void
pageIndex int Zero-based index of a page for rotation.
angle PageRotate The angle which must be turned page
return void

ScrollToChar() public method

Scrolls the control view to the specified character on the current page
public ScrollToChar ( int charIndex ) : void
charIndex int Character index
return void

ScrollToChar() public method

Scrolls the control view to the specified character on the specified page
public ScrollToChar ( int pageIndex, int charIndex ) : void
pageIndex int Zero-based index of a page.
charIndex int Character index
return void

ScrollToPage() public method

Scrolls the control view to the specified page.
public ScrollToPage ( int index ) : void
index int Zero-based index of a page.
return void

ScrollToPoint() public method

Scrolls the control view to the specified point on the specified page
public ScrollToPoint ( int pageIndex, Point pagePoint ) : void
pageIndex int Zero-based index of a page.
pagePoint Point Point on the page in the page's coordinate system
return void

SelectText() public method

Selects the text contained in specified pages.
public SelectText ( SelectInfo SelInfo ) : void
SelInfo SelectInfo structure that describe text selection parameters.
return void

SelectText() public method

Selects the text contained in specified pages.
public SelectText ( int startPage, int startIndex, int endPage, int endIndex ) : void
startPage int Zero-based index of a starting page.
startIndex int Zero-based char index on a startPage.
endPage int Zero-based index of a ending page.
endIndex int Zero-based char index on a endPage.
return void

SetHorizontalOffset() public method

Sets the amount of horizontal offset.
public SetHorizontalOffset ( double offset ) : void
offset double The degree to which content is horizontally offset from the containing viewport.
return void

SetVerticalOffset() public method

Sets the amount of vertical offset.
public SetVerticalOffset ( double offset ) : void
offset double The degree to which content is vertically offset from the containing viewport.
return void

UpdateDocLayout() public method

Ensures that all sizes and positions of pages of a PdfViewer control are properly updated for layout.
public UpdateDocLayout ( ) : void
return void

Property Details

CurrentPageHighlightColorProperty public static property

DependencyProperty as the backing store for CurrentPageHighlightColor
public static DependencyProperty,System.Windows CurrentPageHighlightColorProperty
return System.Windows.DependencyProperty

DocumentProperty public static property

DependencyProperty as the backing store for PdfViewer
Please note The OneWay binding would be disabled if you set the Document property with a document what is not from the binding source. More explanations can be found here The TwoWay binding does not allow you to set the Document property with the document what is not from a binding source.
public static DependencyProperty,System.Windows DocumentProperty
return System.Windows.DependencyProperty

FormHighlightColorProperty public static property

DependencyProperty as the backing store for FormHighlightColor
public static DependencyProperty,System.Windows FormHighlightColorProperty
return System.Windows.DependencyProperty

LoadingIconTextProperty public static property

DependencyProperty as the backing store for LoadingIconText
public static DependencyProperty,System.Windows LoadingIconTextProperty
return System.Windows.DependencyProperty

MouseModeProperty public static property

DependencyProperty as the backing store for MouseMode
public static DependencyProperty MouseModeProperty
return DependencyProperty

PaddingProperty public static property

DependencyProperty as the backing store for Padding
public static DependencyProperty PaddingProperty
return DependencyProperty

PageBackColorProperty public static property

DependencyProperty as the backing store for PageBackColor
public static DependencyProperty PageBackColorProperty
return DependencyProperty

PageBorderColorProperty public static property

DependencyProperty as the backing store for PageBorderColor
public static DependencyProperty PageBorderColorProperty
return DependencyProperty

PageHAlignProperty public static property

DependencyProperty as the backing store for PageHAlign
public static DependencyProperty PageHAlignProperty
return DependencyProperty

PageMarginProperty public static property

DependencyProperty as the backing store for PageMargin
public static DependencyProperty PageMarginProperty
return DependencyProperty

PageSeparatorColorProperty public static property

DependencyProperty as the backing store for PageSeparatorColor
public static DependencyProperty PageSeparatorColorProperty
return DependencyProperty

PageVAlignProperty public static property

DependencyProperty as the backing store for PageVAlign
public static DependencyProperty PageVAlignProperty
return DependencyProperty

RenderFlagsProperty public static property

DependencyProperty as the backing store for RenderFlags
public static DependencyProperty RenderFlagsProperty
return DependencyProperty

SelectedTextProperty public static property

DependencyProperty as the backing store for SelectedText
public static DependencyProperty SelectedTextProperty
return DependencyProperty

ShowCurrentPageHighlightProperty public static property

DependencyProperty as the backing store for ShowCurrentPageHighlight
public static DependencyProperty ShowCurrentPageHighlightProperty
return DependencyProperty

ShowLoadingIconProperty public static property

DependencyProperty as the backing store for ShowLoadingIcon
public static DependencyProperty ShowLoadingIconProperty
return DependencyProperty

ShowPageSeparatorProperty public static property

DependencyProperty as the backing store for ShowPageSeparator
public static DependencyProperty ShowPageSeparatorProperty
return DependencyProperty

SizeModeProperty public static property

DependencyProperty as the backing store for SizeMode
public static DependencyProperty SizeModeProperty
return DependencyProperty

TextSelectColorProperty public static property

DependencyProperty as the backing store for TextSelectColor
public static DependencyProperty TextSelectColorProperty
return DependencyProperty

TilesCountProperty public static property

DependencyProperty as the backing store for TilesCount
public static DependencyProperty TilesCountProperty
return DependencyProperty

UseProgressiveRenderProperty public static property

DependencyProperty as the backing store for UseProgressiveRender
public static DependencyProperty UseProgressiveRenderProperty
return DependencyProperty

ViewModeProperty public static property

DependencyProperty as the backing store for ViewMode
public static DependencyProperty ViewModeProperty
return DependencyProperty

ZoomProperty public static property

DependencyProperty as the backing store for Zoom
public static DependencyProperty ZoomProperty
return DependencyProperty