Class Zoombox
[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
AnimationBeginningEvent
public static readonly RoutedEvent AnimationBeginningEvent
Field Value
AnimationCompletedEvent
public static readonly RoutedEvent AnimationCompletedEvent
Field Value
AnimationDecelerationRatioProperty
public static readonly DependencyProperty AnimationDecelerationRatioProperty
Field Value
AnimationDurationProperty
public static readonly DependencyProperty AnimationDurationProperty
Field Value
AreDragModifiersActiveProperty
public static readonly DependencyProperty AreDragModifiersActiveProperty
Field Value
AreRelativeZoomModifiersActiveProperty
public static readonly DependencyProperty AreRelativeZoomModifiersActiveProperty
Field Value
AreZoomModifiersActiveProperty
public static readonly DependencyProperty AreZoomModifiersActiveProperty
Field Value
AreZoomToSelectionModifiersActiveProperty
public static readonly DependencyProperty AreZoomToSelectionModifiersActiveProperty
Field Value
AutoWrapContentWithViewboxProperty
public static readonly DependencyProperty AutoWrapContentWithViewboxProperty
Field Value
Back
public static RoutedUICommand Back
Field Value
Center
public static RoutedUICommand Center
Field Value
CurrentViewChangedEvent
public static readonly RoutedEvent CurrentViewChangedEvent
Field Value
CurrentViewIndexProperty
public static readonly DependencyProperty CurrentViewIndexProperty
Field Value
CurrentViewProperty
public static readonly DependencyProperty CurrentViewProperty
Field Value
DragModifiersProperty
public static readonly DependencyProperty DragModifiersProperty
Field Value
DragOnPreviewProperty
public static readonly DependencyProperty DragOnPreviewProperty
Field Value
EffectiveViewStackModeProperty
public static readonly DependencyProperty EffectiveViewStackModeProperty
Field Value
Fill
public static RoutedUICommand Fill
Field Value
Fit
public static RoutedUICommand Fit
Field Value
Forward
public static RoutedUICommand Forward
Field Value
HasBackStackProperty
public static readonly DependencyProperty HasBackStackProperty
Field Value
HasForwardStackProperty
public static readonly DependencyProperty HasForwardStackProperty
Field Value
Home
public static RoutedUICommand Home
Field Value
IsAnimatedProperty
public static readonly DependencyProperty IsAnimatedProperty
Field Value
IsDraggingContentProperty
public static readonly DependencyProperty IsDraggingContentProperty
Field Value
IsSelectingRegionProperty
public static readonly DependencyProperty IsSelectingRegionProperty
Field Value
IsUsingScrollBarsProperty
public static readonly DependencyProperty IsUsingScrollBarsProperty
Field Value
KeepContentInBoundsProperty
public static readonly DependencyProperty KeepContentInBoundsProperty
Field Value
MaxScaleProperty
public static readonly DependencyProperty MaxScaleProperty
Field Value
MinScaleProperty
public static readonly DependencyProperty MinScaleProperty
Field Value
NavigateOnPreviewProperty
public static readonly DependencyProperty NavigateOnPreviewProperty
Field Value
PanDistanceProperty
public static readonly DependencyProperty PanDistanceProperty
Field Value
PanDown
public static RoutedUICommand PanDown
Field Value
PanLeft
public static RoutedUICommand PanLeft
Field Value
PanRight
public static RoutedUICommand PanRight
Field Value
PanUp
public static RoutedUICommand PanUp
Field Value
PositionProperty
public static readonly DependencyProperty PositionProperty
Field Value
Refocus
public static RoutedUICommand Refocus
Field Value
RelativeZoomModifiersProperty
public static readonly DependencyProperty RelativeZoomModifiersProperty
Field Value
ScaleProperty
public static readonly DependencyProperty ScaleProperty
Field Value
ViewFinderProperty
public static readonly DependencyProperty ViewFinderProperty
Field Value
ViewFinderVisibilityProperty
public static readonly DependencyProperty ViewFinderVisibilityProperty
Field Value
ViewStackCountProperty
public static readonly DependencyProperty ViewStackCountProperty
Field Value
ViewStackIndexChangedEvent
public static readonly RoutedEvent ViewStackIndexChangedEvent
Field Value
ViewStackIndexProperty
public static readonly DependencyProperty ViewStackIndexProperty
Field Value
ViewStackModeProperty
public static readonly DependencyProperty ViewStackModeProperty
Field Value
ViewStackSourceProperty
public static readonly DependencyProperty ViewStackSourceProperty
Field Value
ViewportProperty
public static readonly DependencyProperty ViewportProperty
Field Value
ZoomIn
public static RoutedUICommand ZoomIn
Field Value
ZoomModifiersProperty
public static readonly DependencyProperty ZoomModifiersProperty
Field Value
ZoomOnPreviewProperty
public static readonly DependencyProperty ZoomOnPreviewProperty
Field Value
ZoomOnProperty
public static readonly DependencyProperty ZoomOnProperty
Field Value
ZoomOriginProperty
public static readonly DependencyProperty ZoomOriginProperty
Field Value
ZoomOut
public static RoutedUICommand ZoomOut
Field Value
ZoomPercentageProperty
public static readonly DependencyProperty ZoomPercentageProperty
Field Value
ZoomToSelectionModifiersProperty
public static readonly DependencyProperty ZoomToSelectionModifiersProperty
Field Value
Properties
AnimationAccelerationRatio
public double AnimationAccelerationRatio { get; set; }
Property Value
AnimationDecelerationRatio
public double AnimationDecelerationRatio { get; set; }
Property Value
AnimationDuration
public Duration AnimationDuration { get; set; }
Property Value
AreDragModifiersActive
public bool AreDragModifiersActive { get; }
Property Value
AreRelativeZoomModifiersActive
public bool AreRelativeZoomModifiersActive { get; }
Property Value
AreZoomModifiersActive
public bool AreZoomModifiersActive { get; }
Property Value
AreZoomToSelectionModifiersActive
public bool AreZoomToSelectionModifiersActive { get; }
Property Value
AutoWrapContentWithViewbox
public bool AutoWrapContentWithViewbox { get; set; }
Property Value
CurrentView
public ZoomboxView CurrentView { get; }
Property Value
CurrentViewIndex
public int CurrentViewIndex { get; }
Property Value
DragModifiers
[TypeConverter(typeof(KeyModifierCollectionConverter))]
public KeyModifierCollection DragModifiers { get; set; }
Property Value
DragOnPreview
public bool DragOnPreview { get; set; }
Property Value
EffectiveViewStackMode
public ZoomboxViewStackMode EffectiveViewStackMode { get; }
Property Value
HasBackStack
public bool HasBackStack { get; }
Property Value
HasForwardStack
public bool HasForwardStack { get; }
Property Value
IsAnimated
public bool IsAnimated { get; set; }
Property Value
IsDraggingContent
public bool IsDraggingContent { get; }
Property Value
IsSelectingRegion
public bool IsSelectingRegion { get; }
Property Value
IsUsingScrollBars
public bool IsUsingScrollBars { get; set; }
Property Value
KeepContentInBounds
public bool KeepContentInBounds { get; set; }
Property Value
MaxScale
public double MaxScale { get; set; }
Property Value
MinScale
public double MinScale { get; set; }
Property Value
NavigateOnPreview
public bool NavigateOnPreview { get; set; }
Property Value
PanDistance
public double PanDistance { get; set; }
Property Value
Position
public Point Position { get; set; }
Property Value
RelativeZoomModifiers
[TypeConverter(typeof(KeyModifierCollectionConverter))]
public KeyModifierCollection RelativeZoomModifiers { get; set; }
Property Value
Scale
public double Scale { get; set; }
Property Value
ViewFinder
public FrameworkElement ViewFinder { get; set; }
Property Value
ViewStack
public ZoomboxViewStack ViewStack { get; }
Property Value
ViewStackCount
public int ViewStackCount { get; }
Property Value
ViewStackIndex
public int ViewStackIndex { get; set; }
Property Value
ViewStackMode
public ZoomboxViewStackMode ViewStackMode { get; set; }
Property Value
ViewStackSource
[Bindable(true)]
public IEnumerable ViewStackSource { get; set; }
Property Value
Viewport
public Rect Viewport { get; }
Property Value
ZoomModifiers
[TypeConverter(typeof(KeyModifierCollectionConverter))]
public KeyModifierCollection ZoomModifiers { get; set; }
Property Value
ZoomOn
public ZoomboxZoomOn ZoomOn { get; set; }
Property Value
ZoomOnPreview
public bool ZoomOnPreview { get; set; }
Property Value
ZoomOrigin
public Point ZoomOrigin { get; set; }
Property Value
ZoomPercentage
public double ZoomPercentage { get; set; }
Property Value
ZoomToSelectionModifiers
[TypeConverter(typeof(KeyModifierCollectionConverter))]
public KeyModifierCollection ZoomToSelectionModifiers { get; set; }
Property Value
Methods
CenterContent()
public void CenterContent()
FillToBounds()
public void FillToBounds()
FitToBounds()
public void FitToBounds()
GetViewFinderVisibility(DependencyObject)
public static Visibility GetViewFinderVisibility(DependencyObject d)
Parameters
Returns
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
SizeThe 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
objectThe old value of the Content property.
newContent
objectThe 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
KeyboardFocusChangedEventArgsThe 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
EventArgsThe 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
KeyEventArgsThe 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
KeyboardFocusChangedEventArgsThe 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
MouseButtonEventArgsThe 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
MouseEventArgsThe 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
MouseEventArgsThe 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
MouseButtonEventArgsThe 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
MouseButtonEventArgsThe 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
MouseEventArgsThe 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
MouseWheelEventArgsThe 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
KeyEventArgsThe 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
MouseButtonEventArgsThe 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
MouseButtonEventArgsThe 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
MouseButtonEventArgsThe 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
MouseEventArgsThe 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
MouseWheelEventArgsThe 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
DrawingContextThe 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
DependencyObjectvalue
Visibility
Zoom(double)
public void Zoom(double percentage)
Parameters
percentage
double
Zoom(double, Point)
public void Zoom(double percentage, Point relativeTo)
Parameters
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
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
AnimationCompleted
public event RoutedEventHandler AnimationCompleted
Event Type
CurrentViewChanged
public event ZoomboxViewChangedEventHandler CurrentViewChanged
Event Type
Scroll
public event EventHandler<ScrollEventArgs> Scroll
Event Type
ViewStackIndexChanged
public event IndexChangedEventHandler ViewStackIndexChanged