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

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

Protected Methods

Method Description
CalcCurrentZoomLevel ( ) : void

Calculate zoom level for current Zoom and store it in internal field

InitializeButtons ( ) : void

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

OnActualSizeClick ( System.Windows.Controls.MenuItem item ) : void

Occurs when the Actual Size item is clicked

OnFitHeightClick ( System.Windows.Controls.MenuItem item ) : void

Occurs when the Fit To Height item is clicked

OnFitPageClick ( System.Windows.Controls.MenuItem item ) : void

Occurs when the Fit To Page item is clicked

OnFitWidthClick ( System.Windows.Controls.MenuItem item ) : void

Occurs when the Fit To Width item is clicked

OnPdfViewerChanging ( PdfViewer oldValue, PdfViewer newValue ) : void

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

OnPropertyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void

Invoked whenever the effective value of any dependency property on this System.Windows.FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs).

OnToolBarOrientationChanged ( ) : void

Raises the LayoutCompleted event.

OnTrackBarValueChanged ( System.Windows.Controls.Slider item ) : void

Occurs when the Value property of a track bar changes, either by movement of the scroll box or by manipulation in code.

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

Occurs when the Zoom In button is clicked

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

Occurs when the Zoom Out button is clicked

OnZoomLevelClick ( System.Windows.Controls.Button item, double zoom ) : void

Occurs when the any item with zoom level clicked in ZoomDropDown button

SetZoom ( double zoom ) : void

Sets specified zoom for Pdf document

SetZoom ( int zoomIndex ) : void

Sets specified zoom level for Pdf document

UpdateButtons ( ) : void

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

Private Methods

Method Description
CreateTrackBar ( ) : System.Windows.Controls.Slider
CreateZoomDropDown ( ) : System.Windows.Controls.Button
PdfViewer_SomethingChanged ( object sender, EventArgs e ) : void
SubscribePdfViewEvents ( PdfViewer newValue ) : void
TrackBar_ValueChanged ( object sender, EventArgs e ) : void
UnsubscribePdfViewEvents ( PdfViewer oldValue ) : void
ZoomLevel_ButtonClick ( object sender, EventArgs e ) : void
ZoomLevel_Click ( object sender, EventArgs e ) : void
ZoomLevel_DropDownOpening ( object sender, EventArgs e ) : void
btn_ActualSizeClick ( object sender, System e ) : void
btn_FitHeightClick ( object sender, System e ) : void
btn_FitPageClick ( object sender, System e ) : void
btn_FitWidthClick ( object sender, System e ) : void
btn_ZoomExInClick ( object sender, System e ) : void
btn_ZoomExOutClick ( object sender, System e ) : void

Method Details

CalcCurrentZoomLevel() protected method

Calculate zoom level for current Zoom and store it in internal field
protected CalcCurrentZoomLevel ( ) : void
return void

InitializeButtons() protected method

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

OnActualSizeClick() protected method

Occurs when the Actual Size item is clicked
protected OnActualSizeClick ( System.Windows.Controls.MenuItem item ) : void
item System.Windows.Controls.MenuItem The item that has been clicked
return void

OnFitHeightClick() protected method

Occurs when the Fit To Height item is clicked
protected OnFitHeightClick ( System.Windows.Controls.MenuItem item ) : void
item System.Windows.Controls.MenuItem The item that has been clicked
return void

OnFitPageClick() protected method

Occurs when the Fit To Page item is clicked
protected OnFitPageClick ( System.Windows.Controls.MenuItem item ) : void
item System.Windows.Controls.MenuItem The item that has been clicked
return void

OnFitWidthClick() protected method

Occurs when the Fit To Width item is clicked
protected OnFitWidthClick ( System.Windows.Controls.MenuItem item ) : void
item System.Windows.Controls.MenuItem The item that has been clicked
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

OnPropertyChanged() protected method

Invoked whenever the effective value of any dependency property on this System.Windows.FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs).
protected OnPropertyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs The event data that describes the property that changed, as well as old and new values
return void

OnToolBarOrientationChanged() protected method

Raises the LayoutCompleted event.
protected OnToolBarOrientationChanged ( ) : void
return void

OnTrackBarValueChanged() protected method

Occurs when the Value property of a track bar changes, either by movement of the scroll box or by manipulation in code.
protected OnTrackBarValueChanged ( System.Windows.Controls.Slider item ) : void
item System.Windows.Controls.Slider The item that has been clicked
return void

OnZoomExInClick() protected method

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

OnZoomExOutClick() protected method

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

OnZoomLevelClick() protected method

Occurs when the any item with zoom level clicked in ZoomDropDown button
protected OnZoomLevelClick ( System.Windows.Controls.Button item, double zoom ) : void
item System.Windows.Controls.Button The item that has been clicked
zoom double The zoom value of item that was clicked
return void

SetZoom() protected method

Sets specified zoom for Pdf document
protected SetZoom ( double zoom ) : void
zoom double zoom value
return void

SetZoom() protected method

Sets specified zoom level for Pdf document
protected SetZoom ( int zoomIndex ) : void
zoomIndex int Index of the zoom in ZoomLevel
return void

UpdateButtons() protected method

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