C# Class Patagames.Pdf.Net.Controls.Wpf.ToolBars.PdfToolBarMain

Provides a container for Windows toolbar objects with predefined functionality for opening and printing
Inheritance: PdfToolBar
Show file Open project: Patagames/Pdf.Wpf

Public Properties

Property Type Description
WindowProperty System.Windows.DependencyProperty

Protected Methods

Method Description
InitializeButtons ( ) : void

Create all buttons and add its into toolbar. Override this method to create custom buttons

OnOpenClick ( System.Windows.Controls.Button item ) : void

Occurs when the Open button is clicked

OnPasswordRequired ( ) : string

Occurs when the Loaded document protected by password. Application should return the password

OnPdfPrinDocumentCreaded ( EventArgs e ) : void

Occurs after an instance of PdfPrintDocument class is created and before printing is started.

OnPdfViewerChanging ( PdfViewer oldValue, PdfViewer newValue ) : void

Called when the current PdfViewer control associated with the ToolBar is changing.

OnPrintClick ( System.Windows.Controls.Button item ) : void

Occurs when the Print button is clicked

UpdateButtons ( ) : void

Called when the ToolBar's items need to change its states

Private Methods

Method Description
PdfViewer_DocumentClosed ( object sender, EventArgs e ) : void
PdfViewer_DocumentLoaded ( object sender, EventArgs e ) : void
ShowPrintDialog ( System dlg ) : void
SubscribePdfViewEvents ( PdfViewer newValue ) : void
UnsubscribePdfViewEvents ( PdfViewer oldValue ) : void
btn_OpenDocClick ( object sender, EventArgs e ) : void
btn_PrintDocClick ( object sender, EventArgs e ) : void

Method Details

InitializeButtons() protected method

Create all buttons and add its into toolbar. Override this method to create custom buttons
protected InitializeButtons ( ) : void
return void

OnOpenClick() protected method

Occurs when the Open button is clicked
protected OnOpenClick ( System.Windows.Controls.Button item ) : void
item System.Windows.Controls.Button The item that has been clicked
return void

OnPasswordRequired() protected method

Occurs when the Loaded document protected by password. Application should return the password
protected OnPasswordRequired ( ) : string
return string

OnPdfPrinDocumentCreaded() protected method

Occurs after an instance of PdfPrintDocument class is created and before printing is started.
protected OnPdfPrinDocumentCreaded ( EventArgs e ) : void
e EventArgs
return void

OnPdfViewerChanging() protected method

Called when the current PdfViewer control associated with the ToolBar is changing.
protected OnPdfViewerChanging ( PdfViewer oldValue, PdfViewer newValue ) : void
oldValue PdfViewer PdfViewer control of which was associated with the ToolBar.
newValue PdfViewer PdfViewer control of which will be associated with the ToolBar.
return void

OnPrintClick() protected method

Occurs when the Print button is clicked
protected OnPrintClick ( System.Windows.Controls.Button item ) : void
item System.Windows.Controls.Button The item that has been clicked
return void

UpdateButtons() protected method

Called when the ToolBar's items need to change its states
protected UpdateButtons ( ) : void
return void

Property Details

WindowProperty public static property

DependencyProperty as the backing store for PdfViewer
public static DependencyProperty,System.Windows WindowProperty
return System.Windows.DependencyProperty