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

Represents the base functionality for all PdfToolBars
Inheritance: System.Windows.Controls.ToolBar
Show file Open project: Patagames/Pdf.Wpf

Public Properties

Property Type Description
PdfViewerProperty System.Windows.DependencyProperty

Public Methods

Method Description
PdfToolBar ( ) : System

Initialize the new instance of PdfToolBar class

Protected Methods

Method Description
CreateButton ( string name, string text, string toolTipText, Uri imgRes, RoutedEventHandler onClick, int imgWidth = 32, int imgHeight = 32, ImageTextType imageTextType = ImageTextType.ImageBeforeText ) : System.Windows.Controls.Button

Create a new instance of Button class with the specified name that displays the specified text and image and that raises the Click event.

CreateToggleButton ( string name, string text, string toolTipText, string imgResName, RoutedEventHandler onClick, int imgWidth = 32, int imgHeight = 32, ImageTextType imageTextType = ImageTextType.ImageBeforeText ) : System.Windows.Controls.Primitives.ToggleButton

Create a new instance of ToggleButon class with the specified name that displays the specified text and image and that raises the Click event.

CreateUriToResource ( string resName ) : Uri

Create the Uri to the resource with the specified name.

InitializeButtons ( ) : void

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

OnPdfViewerChanging ( PdfViewer oldValue, PdfViewer newValue ) : void

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

UpdateButtons ( ) : void

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

Method Details

CreateButton() protected method

Create a new instance of Button class with the specified name that displays the specified text and image and that raises the Click event.
protected CreateButton ( string name, string text, string toolTipText, Uri imgRes, RoutedEventHandler onClick, int imgWidth = 32, int imgHeight = 32, ImageTextType imageTextType = ImageTextType.ImageBeforeText ) : System.Windows.Controls.Button
name string The name of the Button.
text string The text to display on the Button.
toolTipText string Specify the text that appears as a ToolTip for a control.
imgRes System.Uri The image to display on the Button.
onClick RoutedEventHandler An event handler that raises the Click event.
imgWidth int Image width
imgHeight int Image height
imageTextType ImageTextType Image and text layout
return System.Windows.Controls.Button

CreateToggleButton() protected method

Create a new instance of ToggleButon class with the specified name that displays the specified text and image and that raises the Click event.
protected CreateToggleButton ( string name, string text, string toolTipText, string imgResName, RoutedEventHandler onClick, int imgWidth = 32, int imgHeight = 32, ImageTextType imageTextType = ImageTextType.ImageBeforeText ) : System.Windows.Controls.Primitives.ToggleButton
name string The name of the ToggleButton.
text string The text to display on the ToggleButton.
toolTipText string Specify the text that appears as a ToolTip for a control.
imgResName string The image name in resources to display on the ToggleButton.
onClick RoutedEventHandler An event handler that raises the Click event.
imgWidth int Image width
imgHeight int Image height
imageTextType ImageTextType Image and text layout
return System.Windows.Controls.Primitives.ToggleButton

CreateUriToResource() protected method

Create the Uri to the resource with the specified name.
protected CreateUriToResource ( string resName ) : Uri
resName string Resource's name.
return System.Uri

InitializeButtons() protected method

Create all buttons and add its into toolbar. Override this method to create custom buttons
protected InitializeButtons ( ) : void
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

PdfToolBar() public method

Initialize the new instance of PdfToolBar class
public PdfToolBar ( ) : System
return System

UpdateButtons() protected method

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

Property Details

PdfViewerProperty public static property

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