C# Class ZoomAndPanSample.MainWindow

This is a Window that uses ZoomAndPanControl to zoom and pan around some content. This demonstrates how to use application specific mouse handling logic with ZoomAndPanControl.
Inheritance: System.Windows.Window
Mostra file Open project: Zoomicon/ZUI

Public Properties

Property Type Description
IsImageCachedProperty System.Windows.DependencyProperty
RenderTierProperty System.Windows.DependencyProperty
UseImageEffectsProperty System.Windows.DependencyProperty
UseSoftwareRenderOnlyProperty System.Windows.DependencyProperty

Public Methods

Method Description
MainWindow ( ) : System

Private Methods

Method Description
ApplyDragZoomRect ( ) : void

When the user has finished dragging out the rectangle the zoom operation is applied.

ClearPrevZoomRect ( ) : void

Clear the memory of the previous zoom level.

ExpandContent ( ) : void

Expand the content area to fit the rectangles.

FadeOutDragZoomRect ( ) : void
Fill_Executed ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

The 'Fill' command was executed.

InitDragZoomRect ( Point pt1, Point pt2 ) : void

Initialise the rectangle that the use is dragging out.

JumpBackToPrevZoom ( ) : void

Jump back to the previous zoom level.

JumpBackToPrevZoom_CanExecuted ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void

Determines whether the 'JumpBackToPrevZoom' command can be executed.

JumpBackToPrevZoom_Executed ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

The 'JumpBackToPrevZoom' command was executed.

MainWindow_Loaded ( object sender, RoutedEventArgs e ) : void

Event raised when the Window has loaded.

OnIsImageCachedChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the IsImageCached property.

OnUseImageEffectsChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the UseImageEffects property.

OnUseSoftwareRenderOnlyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the UseSoftwareRenderOnly property.

OneHundredPercent_Executed ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

The 'OneHundredPercent' command was executed.

Rectangle_MouseDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Event raised when a mouse button is clicked down over a Rectangle.

Rectangle_MouseMove ( object sender, System.Windows.Input.MouseEventArgs e ) : void

Event raised when the mouse cursor is moved when over a Rectangle.

Rectangle_MouseUp ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Event raised when a mouse button is released over a Rectangle.

SavePrevZoomRect ( ) : void
SetDragZoomRect ( Point pt1, Point pt2 ) : void

Update the position and size of the rectangle that user is dragging out.

ZoomIn ( Point contentZoomCenter ) : void

Zoom the viewport in, centering on the specified point (in content coordinates).

ZoomIn_Executed ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

The 'ZoomIn' command (bound to the plus key) was executed.

ZoomOut ( Point contentZoomCenter ) : void

Zoom the viewport out, centering on the specified point (in content coordinates).

ZoomOut_Executed ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

The 'ZoomOut' command (bound to the minus key) was executed.

zoomAndPanControl_MouseDoubleClick ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Event raised when the user has double clicked in the zoom and pan control.

zoomAndPanControl_MouseDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Event raised on mouse down in the ZoomAndPanControl.

zoomAndPanControl_MouseMove ( object sender, System.Windows.Input.MouseEventArgs e ) : void

Event raised on mouse move in the ZoomAndPanControl.

zoomAndPanControl_MouseUp ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Event raised on mouse up in the ZoomAndPanControl.

zoomAndPanControl_MouseWheel ( object sender, System.Windows.Input.MouseWheelEventArgs e ) : void

Event raised by rotating the mouse wheel

Method Details

MainWindow() public method

public MainWindow ( ) : System
return System

Property Details

IsImageCachedProperty public_oe static_oe property

IsImageCached Dependency Property
public static DependencyProperty,System.Windows IsImageCachedProperty
return System.Windows.DependencyProperty

RenderTierProperty public_oe static_oe property

public static DependencyProperty,System.Windows RenderTierProperty
return System.Windows.DependencyProperty

UseImageEffectsProperty public_oe static_oe property

UseImageEffects Dependency Property
public static DependencyProperty,System.Windows UseImageEffectsProperty
return System.Windows.DependencyProperty

UseSoftwareRenderOnlyProperty public_oe static_oe property

UseSoftwareRenderOnly Dependency Property
public static DependencyProperty,System.Windows UseSoftwareRenderOnlyProperty
return System.Windows.DependencyProperty