Table of Contents

Class Zoombox

Namespace
H.Controls.ZoomBox
Assembly
H.Controls.ZoomBox.dll
[TemplatePart(Name = "PART_VerticalScrollBar", Type = typeof(ScrollBar))]
[TemplatePart(Name = "PART_HorizontalScrollBar", Type = typeof(ScrollBar))]
public sealed class Zoombox : ContentControl, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, IZoombox
Inheritance
Zoombox
Implements
Inherited Members
Extension Methods

Constructors

Zoombox()

public Zoombox()

Fields

AnimationAccelerationRatioProperty

public static readonly DependencyProperty AnimationAccelerationRatioProperty

Field Value

DependencyProperty

AnimationBeginningEvent

public static readonly RoutedEvent AnimationBeginningEvent

Field Value

RoutedEvent

AnimationCompletedEvent

public static readonly RoutedEvent AnimationCompletedEvent

Field Value

RoutedEvent

AnimationDecelerationRatioProperty

public static readonly DependencyProperty AnimationDecelerationRatioProperty

Field Value

DependencyProperty

AnimationDurationProperty

public static readonly DependencyProperty AnimationDurationProperty

Field Value

DependencyProperty

AreDragModifiersActiveProperty

public static readonly DependencyProperty AreDragModifiersActiveProperty

Field Value

DependencyProperty

AreRelativeZoomModifiersActiveProperty

public static readonly DependencyProperty AreRelativeZoomModifiersActiveProperty

Field Value

DependencyProperty

AreZoomModifiersActiveProperty

public static readonly DependencyProperty AreZoomModifiersActiveProperty

Field Value

DependencyProperty

AreZoomToSelectionModifiersActiveProperty

public static readonly DependencyProperty AreZoomToSelectionModifiersActiveProperty

Field Value

DependencyProperty

AutoWrapContentWithViewboxProperty

public static readonly DependencyProperty AutoWrapContentWithViewboxProperty

Field Value

DependencyProperty

Back

public static RoutedUICommand Back

Field Value

RoutedUICommand

Center

public static RoutedUICommand Center

Field Value

RoutedUICommand

CurrentViewChangedEvent

public static readonly RoutedEvent CurrentViewChangedEvent

Field Value

RoutedEvent

CurrentViewIndexProperty

public static readonly DependencyProperty CurrentViewIndexProperty

Field Value

DependencyProperty

CurrentViewProperty

public static readonly DependencyProperty CurrentViewProperty

Field Value

DependencyProperty

DragModifiersProperty

public static readonly DependencyProperty DragModifiersProperty

Field Value

DependencyProperty

DragOnPreviewProperty

public static readonly DependencyProperty DragOnPreviewProperty

Field Value

DependencyProperty

EffectiveViewStackModeProperty

public static readonly DependencyProperty EffectiveViewStackModeProperty

Field Value

DependencyProperty

Fill

public static RoutedUICommand Fill

Field Value

RoutedUICommand

Fit

public static RoutedUICommand Fit

Field Value

RoutedUICommand

Forward

public static RoutedUICommand Forward

Field Value

RoutedUICommand

HasBackStackProperty

public static readonly DependencyProperty HasBackStackProperty

Field Value

DependencyProperty

HasForwardStackProperty

public static readonly DependencyProperty HasForwardStackProperty

Field Value

DependencyProperty

Home

public static RoutedUICommand Home

Field Value

RoutedUICommand

IsAnimatedProperty

public static readonly DependencyProperty IsAnimatedProperty

Field Value

DependencyProperty

IsDraggingContentProperty

public static readonly DependencyProperty IsDraggingContentProperty

Field Value

DependencyProperty

IsSelectingRegionProperty

public static readonly DependencyProperty IsSelectingRegionProperty

Field Value

DependencyProperty

IsUsingScrollBarsProperty

public static readonly DependencyProperty IsUsingScrollBarsProperty

Field Value

DependencyProperty

KeepContentInBoundsProperty

public static readonly DependencyProperty KeepContentInBoundsProperty

Field Value

DependencyProperty

MaxScaleProperty

public static readonly DependencyProperty MaxScaleProperty

Field Value

DependencyProperty

MinScaleProperty

public static readonly DependencyProperty MinScaleProperty

Field Value

DependencyProperty

NavigateOnPreviewProperty

public static readonly DependencyProperty NavigateOnPreviewProperty

Field Value

DependencyProperty

PanDistanceProperty

public static readonly DependencyProperty PanDistanceProperty

Field Value

DependencyProperty

PanDown

public static RoutedUICommand PanDown

Field Value

RoutedUICommand

PanLeft

public static RoutedUICommand PanLeft

Field Value

RoutedUICommand

PanRight

public static RoutedUICommand PanRight

Field Value

RoutedUICommand

PanUp

public static RoutedUICommand PanUp

Field Value

RoutedUICommand

PositionProperty

public static readonly DependencyProperty PositionProperty

Field Value

DependencyProperty

Refocus

public static RoutedUICommand Refocus

Field Value

RoutedUICommand

RelativeZoomModifiersProperty

public static readonly DependencyProperty RelativeZoomModifiersProperty

Field Value

DependencyProperty

ScaleProperty

public static readonly DependencyProperty ScaleProperty

Field Value

DependencyProperty

ViewFinderProperty

public static readonly DependencyProperty ViewFinderProperty

Field Value

DependencyProperty

ViewFinderVisibilityProperty

public static readonly DependencyProperty ViewFinderVisibilityProperty

Field Value

DependencyProperty

ViewStackCountProperty

public static readonly DependencyProperty ViewStackCountProperty

Field Value

DependencyProperty

ViewStackIndexChangedEvent

public static readonly RoutedEvent ViewStackIndexChangedEvent

Field Value

RoutedEvent

ViewStackIndexProperty

public static readonly DependencyProperty ViewStackIndexProperty

Field Value

DependencyProperty

ViewStackModeProperty

public static readonly DependencyProperty ViewStackModeProperty

Field Value

DependencyProperty

ViewStackSourceProperty

public static readonly DependencyProperty ViewStackSourceProperty

Field Value

DependencyProperty

ViewportProperty

public static readonly DependencyProperty ViewportProperty

Field Value

DependencyProperty

ZoomIn

public static RoutedUICommand ZoomIn

Field Value

RoutedUICommand

ZoomModifiersProperty

public static readonly DependencyProperty ZoomModifiersProperty

Field Value

DependencyProperty

ZoomOnPreviewProperty

public static readonly DependencyProperty ZoomOnPreviewProperty

Field Value

DependencyProperty

ZoomOnProperty

public static readonly DependencyProperty ZoomOnProperty

Field Value

DependencyProperty

ZoomOriginProperty

public static readonly DependencyProperty ZoomOriginProperty

Field Value

DependencyProperty

ZoomOut

public static RoutedUICommand ZoomOut

Field Value

RoutedUICommand

ZoomPercentageProperty

public static readonly DependencyProperty ZoomPercentageProperty

Field Value

DependencyProperty

ZoomToSelectionModifiersProperty

public static readonly DependencyProperty ZoomToSelectionModifiersProperty

Field Value

DependencyProperty

Properties

AnimationAccelerationRatio

public double AnimationAccelerationRatio { get; set; }

Property Value

double

AnimationDecelerationRatio

public double AnimationDecelerationRatio { get; set; }

Property Value

double

AnimationDuration

public Duration AnimationDuration { get; set; }

Property Value

Duration

AreDragModifiersActive

public bool AreDragModifiersActive { get; }

Property Value

bool

AreRelativeZoomModifiersActive

public bool AreRelativeZoomModifiersActive { get; }

Property Value

bool

AreZoomModifiersActive

public bool AreZoomModifiersActive { get; }

Property Value

bool

AreZoomToSelectionModifiersActive

public bool AreZoomToSelectionModifiersActive { get; }

Property Value

bool

AutoWrapContentWithViewbox

public bool AutoWrapContentWithViewbox { get; set; }

Property Value

bool

CurrentView

public ZoomboxView CurrentView { get; }

Property Value

ZoomboxView

CurrentViewIndex

public int CurrentViewIndex { get; }

Property Value

int

DragModifiers

[TypeConverter(typeof(KeyModifierCollectionConverter))]
public KeyModifierCollection DragModifiers { get; set; }

Property Value

KeyModifierCollection

DragOnPreview

public bool DragOnPreview { get; set; }

Property Value

bool

EffectiveViewStackMode

public ZoomboxViewStackMode EffectiveViewStackMode { get; }

Property Value

ZoomboxViewStackMode

HasBackStack

public bool HasBackStack { get; }

Property Value

bool

HasForwardStack

public bool HasForwardStack { get; }

Property Value

bool

IsAnimated

public bool IsAnimated { get; set; }

Property Value

bool

IsDraggingContent

public bool IsDraggingContent { get; }

Property Value

bool

IsSelectingRegion

public bool IsSelectingRegion { get; }

Property Value

bool

IsUsingScrollBars

public bool IsUsingScrollBars { get; set; }

Property Value

bool

KeepContentInBounds

public bool KeepContentInBounds { get; set; }

Property Value

bool

MaxScale

public double MaxScale { get; set; }

Property Value

double

MinScale

public double MinScale { get; set; }

Property Value

double

NavigateOnPreview

public bool NavigateOnPreview { get; set; }

Property Value

bool

PanDistance

public double PanDistance { get; set; }

Property Value

double

Position

public Point Position { get; set; }

Property Value

Point

RelativeZoomModifiers

[TypeConverter(typeof(KeyModifierCollectionConverter))]
public KeyModifierCollection RelativeZoomModifiers { get; set; }

Property Value

KeyModifierCollection

Scale

public double Scale { get; set; }

Property Value

double

ViewFinder

public FrameworkElement ViewFinder { get; set; }

Property Value

FrameworkElement

ViewStack

public ZoomboxViewStack ViewStack { get; }

Property Value

ZoomboxViewStack

ViewStackCount

public int ViewStackCount { get; }

Property Value

int

ViewStackIndex

public int ViewStackIndex { get; set; }

Property Value

int

ViewStackMode

public ZoomboxViewStackMode ViewStackMode { get; set; }

Property Value

ZoomboxViewStackMode

ViewStackSource

[Bindable(true)]
public IEnumerable ViewStackSource { get; set; }

Property Value

IEnumerable

Viewport

public Rect Viewport { get; }

Property Value

Rect

ZoomModifiers

[TypeConverter(typeof(KeyModifierCollectionConverter))]
public KeyModifierCollection ZoomModifiers { get; set; }

Property Value

KeyModifierCollection

ZoomOn

public ZoomboxZoomOn ZoomOn { get; set; }

Property Value

ZoomboxZoomOn

ZoomOnPreview

public bool ZoomOnPreview { get; set; }

Property Value

bool

ZoomOrigin

public Point ZoomOrigin { get; set; }

Property Value

Point

ZoomPercentage

public double ZoomPercentage { get; set; }

Property Value

double

ZoomToSelectionModifiers

[TypeConverter(typeof(KeyModifierCollectionConverter))]
public KeyModifierCollection ZoomToSelectionModifiers { get; set; }

Property Value

KeyModifierCollection

Methods

CenterContent()

public void CenterContent()

FillToBounds()

public void FillToBounds()

FitToBounds()

public void FitToBounds()

GetViewFinderVisibility(DependencyObject)

public static Visibility GetViewFinderVisibility(DependencyObject d)

Parameters

d DependencyObject

Returns

Visibility

GoBack()

public void GoBack()

GoForward()

public void GoForward()

GoHome()

public void GoHome()

MeasureOverride(Size)

Called to remeasure a control.

protected override Size MeasureOverride(Size constraint)

Parameters

constraint Size

The maximum size that the method can return.

Returns

Size

The size of the control, up to the maximum specified by constraint.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnContentChanged(object, object)

Called when the Content property changes.

protected override void OnContentChanged(object oldContent, object newContent)

Parameters

oldContent object

The old value of the Content property.

newContent object

The new value of the Content property.

OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.GotKeyboardFocus 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 override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)

Parameters

e KeyboardFocusChangedEventArgs

The KeyboardFocusChangedEventArgs that contains the event data.

OnInitialized(EventArgs)

Raises the Initialized event. This method is invoked whenever IsInitialized is set to true internally.

protected override void OnInitialized(EventArgs e)

Parameters

e EventArgs

The RoutedEventArgs that contains the event data.

OnKeyDown(KeyEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown 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 override void OnKeyDown(KeyEventArgs e)

Parameters

e KeyEventArgs

The KeyEventArgs that contains the event data.

OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.LostKeyboardFocus 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 override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)

Parameters

e KeyboardFocusChangedEventArgs

The KeyboardFocusChangedEventArgs that contains event data.

OnMouseDown(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseDown 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 override void OnMouseDown(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. This event data reports details about the mouse button that was pressed and the handled state.

OnMouseEnter(MouseEventArgs)

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

protected override void OnMouseEnter(MouseEventArgs e)

Parameters

e MouseEventArgs

The MouseEventArgs that contains the event data.

OnMouseLeave(MouseEventArgs)

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 override void OnMouseLeave(MouseEventArgs e)

Parameters

e MouseEventArgs

The MouseEventArgs that contains the event data.

OnMouseLeftButtonDown(MouseButtonEventArgs)

Invoked when an unhandled MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.

protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.

OnMouseLeftButtonUp(MouseButtonEventArgs)

Invoked when an unhandled MouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.

OnMouseMove(MouseEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseMove 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 override void OnMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

The MouseEventArgs that contains the event data.

OnMouseWheel(MouseWheelEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseWheel 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 override void OnMouseWheel(MouseWheelEventArgs e)

Parameters

e MouseWheelEventArgs

The MouseWheelEventArgs that contains the event data.

OnPreviewKeyDown(KeyEventArgs)

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 override void OnPreviewKeyDown(KeyEventArgs e)

Parameters

e KeyEventArgs

The KeyEventArgs that contains the event data.

OnPreviewMouseDown(MouseButtonEventArgs)

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

protected override void OnPreviewMouseDown(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that one or more mouse buttons were pressed.

OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)

Invoked when an unhandled PreviewMouseLeftButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.

OnPreviewMouseLeftButtonUp(MouseButtonEventArgs)

Invoked when an unhandled PreviewMouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnPreviewMouseLeftButtonUp(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.

OnPreviewMouseMove(MouseEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseMove 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 override void OnPreviewMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

The MouseEventArgs that contains the event data.

OnPreviewMouseWheel(MouseWheelEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseWheel 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 override void OnPreviewMouseWheel(MouseWheelEventArgs e)

Parameters

e MouseWheelEventArgs

The MouseWheelEventArgs that contains the event data.

OnRender(DrawingContext)

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.

protected override void OnRender(DrawingContext drawingContext)

Parameters

drawingContext DrawingContext

The drawing instructions for a specific element. This context is provided to the layout system.

RefocusView()

public void RefocusView()

SetViewFinderVisibility(DependencyObject, Visibility)

public static void SetViewFinderVisibility(DependencyObject d, Visibility value)

Parameters

d DependencyObject
value Visibility

Zoom(double)

public void Zoom(double percentage)

Parameters

percentage double

Zoom(double, Point)

public void Zoom(double percentage, Point relativeTo)

Parameters

percentage double
relativeTo Point

ZoomTo(ZoomboxView)

public void ZoomTo(ZoomboxView view)

Parameters

view ZoomboxView

ZoomTo(double)

public void ZoomTo(double scale)

Parameters

scale double

ZoomTo(double, Point)

public void ZoomTo(double scale, Point relativeTo)

Parameters

scale double
relativeTo Point

ZoomTo(Point)

public void ZoomTo(Point position)

Parameters

position Point

ZoomTo(Rect)

public void ZoomTo(Rect region)

Parameters

region Rect

Events

AnimationBeginning

public event RoutedEventHandler AnimationBeginning

Event Type

RoutedEventHandler

AnimationCompleted

public event RoutedEventHandler AnimationCompleted

Event Type

RoutedEventHandler

CurrentViewChanged

public event ZoomboxViewChangedEventHandler CurrentViewChanged

Event Type

ZoomboxViewChangedEventHandler

Scroll

public event EventHandler<ScrollEventArgs> Scroll

Event Type

EventHandler<ScrollEventArgs>

ViewStackIndexChanged

public event IndexChangedEventHandler ViewStackIndexChanged

Event Type

IndexChangedEventHandler