Click or drag to resize

ZoomBox class

Provides a ContentControl with additional properties: Zoom functions via Ctrl mouse wheel, vertical scrolling via mouse wheel, Horizontal scrolling via shift mouse wheel, normal view via right mouse button, Complete view via Ctrl-right mouse button.
Inheritance hierarchy
SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            System.Windows.ControlsControl
              System.Windows.ControlsContentControl
                NetEti.CustomControlsZoomBox

Namespace: NetEti.CustomControls
Assembly: NetEti.ZoomBox (in NetEti.ZoomBox.dll) Version: 1.0.0+5ee800418dee8f46c939f296c9beaab353004ca7
Syntax
public class ZoomBox : ContentControl, IDisposable

The ZoomBox Type exposes the following members.

Constructors
 NameDescription of the
Public MethodZoomBox Standard constructor.
Back to the top
Properties
 NameDescription of the
Public PropertyHorizontalScroll Gets or sets the horizontal scroll width in device-independent pixels. Default: 0.0.
Public PropertyHorizontalScrollBarVisibility Gets or sets the visibility of an optional horizontal scrollbar.
Public PropertyIsHorizontalScrollbarVisible Returns True if the horizontal scrollbar is currently visible.
Public PropertyIsVerticalScrollbarVisible Returns True if the vertical scrollbar is currently visible.
Public PropertyMinimalScaleFactor Get or set the minimum scale factor. The minimum scale factor indicates how much elements can be reduced in size. This also indirectly limits the maximum number of elements that can be can be on the screen at the same time. For very large jobs with very many controls, this is crucial for the performance of the WPF application. Default: 0.3.
Public PropertyVerticalScroll Gets or sets the vertical scroll width in device-independent pixels. Default: 0.0.
Public PropertyVerticalScrollBarVisibility Gets or sets the visibility of an optional vertical scrollbar.
Back to the top
Methods
 NameDescription of the
Public MethodDispose Public method for cleaning up.
Protected MethodDispose(Boolean) Finalising work, releasing resources.
Public MethodStatic MemberFindFirstVisualParentOfTypeT Searches in the VisualTree from the FrameworkElement element upwards after the first parent element of type T with name == name.
Public MethodGetScale Returns the current zoom settings of the ZoomBox.
Public MethodPresetScale Prepares the setting of the current zoom settings of the ZoomBox. These will then be adopted with the next ZoomBox_LayoutUpdated.
Public MethodSetScale Sets the current zoom settings of the ZoomBox.
Back to the top
Fields
 NameDescription of the
Public FieldStatic MemberHorizontalScrollBarVisibilityProperty Gets or sets the visibility of an optional horizontal scrollbar.
Public FieldStatic MemberVerticalScrollBarVisibilityProperty Gets or sets the visibility of an optional vertical scrollbar.
Back to the top
Remarks
File: ZoomBox.cs Author: Erik Nagel, NetEti
23.07.2013 Erik Nagel: created 26.07.2023 Erik Nagel: Windows.DragMove while maintaining the responsiveness of other controls (buttons) is implemented (DelayedDragMove). 13.02.2024 Erik Nagel: DelayedDragMove only for non-visible scrollbars. 13.02.2024 Erik Nagel: DelayedDragMove completely removed - led to UserControls that could not be scrolled with the mouse.
See also