Click or drag to resize

ZoomPanelNavigator Class

ZoomPanelNavigator control can be used to control the ZoomPanel with buttons to move around and with slider to control the ZoomFactor.
Inheritance Hierarchy

Namespace:  Ab2d.Controls
Assembly:  Ab2d.Controls.ZoomPanel (in Ab2d.Controls.ZoomPanel.dll) Version: 5.2.6631.1040
Syntax
C#
public class ZoomPanelNavigator : Control

The ZoomPanelNavigator type exposes the following members.

Constructors
  NameDescription
Public methodZoomPanelNavigator
Constructor
Top
Properties
  NameDescription
Public propertyIsAutoZoomPanelFindingEnabled
Gets or sets a Boolean which specifies that if TargetZoomPanel or TargetZoomPanelName properties are not manually set the first ZoomPanel is automatically found from the current UserControl, Page or Window. Default value is true.
Public propertyIsSnapToTickEnabled
Gets or sets a boolean that specifies if snapping to specific ZoomFactor values is enabled.
Public propertyIsZoomPanelLimitedToMinMaxZoomFactors
Gets or sets a boolean that specifies if the ZoomPanel is limited to the MinZoomFactor and MaxZoomFactor values.
Public propertyMaxZoomFactor
Gets or sets a double that specifies the maximum ZoomFactor value.
Public propertyMinZoomFactor
Gets or sets a double that specifies the minimum ZoomFactor value.
Public propertyNavigationCircleVisibility
Gets or sets a Visibility of the used NavigationCircle.
Public propertyNavigationSliderVisibility
Gets or sets a Visibility of the used NavigationSlider.
Public propertyOrientation
Gets or sets the orientation of a ZoomPanelNavigator. Default value is Vertical.
Public propertyTargetZoomPanel
Gets or sets the ZoomPanel control that is controlled by this ZoomPanelNavigator.
Public propertyTargetZoomPanelName
Gets or sets the name of the ZoomPanel that is controls with this ZoomPanelNavigator.
Public propertyUsedNavigationCircle
Used NavigationCircle control.
Public propertyUsedNavigationSlider
Used NavigationSlider control.
Public propertyZoomFactor
Gets or sets the ZoomFactor that is applied to ZoomPanel.
Top
Methods
Events
  NameDescription
Public eventNavigatorSliderValueChanged
NavigatorSliderValueChanged occurs when navigation slider value is changed by the user. The event handler can also change the proposed ZoomFactor value.
Top
Fields
  NameDescription
Public fieldCalculateSliderValueFromZoomFactor
Callback method that can be used to provide custom calculation of slider value from ZoomFactor.
Public fieldCalculateZoomFactorFromSliderValue
Callback method that can be used to provide custom calculation of ZoomFactor from slider value.
Public fieldStatic memberIsAutoZoomPanelFindingEnabledProperty
IsAutoZoomPanelFindingEnabledProperty
Public fieldStatic memberIsSnapToTickEnabledProperty
IsSnapToTickEnabledProperty
Public fieldStatic memberIsZoomPanelLimitedToMinMaxZoomFactorsProperty
IsZoomPanelLimitedToMinMaxZoomFactorsProperty
Public fieldStatic memberMaxZoomFactorProperty
MaxZoomFactorProperty
Public fieldStatic memberMinZoomFactorProperty
MinZoomFactorProperty
Public fieldStatic memberNavigationCircleVisibilityProperty
NavigationCircleVisibilityProperty
Public fieldStatic memberNavigationSliderVisibilityProperty
NavigationSliderVisibilityProperty
Public fieldStatic memberNavigatorSliderValueChangedEvent
NavigatorSliderValueChanged RoutedEvent
Public fieldStatic memberOrientationProperty
OrientationProperty
Public fieldStatic memberTargetZoomPanelNameProperty
TargetZoomPanelNameProperty
Public fieldStatic memberTargetZoomPanelProperty
ViewboxExProperty
Public fieldStatic memberZoomFactorProperty
ZoomFactorProperty
Top
Remarks

ZoomPanelNavigator control can be used to control the ZoomPanel with buttons to move around and with slider to control the ZoomFactor.

The ZoomPanelNavigator is using the NavigationCircle and NavigationSlider controls. The used controls can be accessed by UsedNavigationCircle and UsedNavigationSlider properties.

ZoomPanelNavigator must be connected to a ZoomPanel to control it. The ZoomPanel can be automatically discovered in the current Window or Page. But if there are more ZoomPanels defined or you would like to explicitly set the ZoomPanel, TargetZoomPanelName or TargetZoomPanel can be used to connect ZoomPanelNavigator with the specific ZoomPanel. To disable the automatic discovery of ZoomPanel the IsAutoZoomPanelFindingEnabled property can be set to false.

The level of zoom that is applied to ZoomPanel is controlled by the ZoomFactor property. The minimum and maximum values of the ZoomFactor are set by MinZoomFactor and MaxZoomFactor.

With NavigationCircleVisibility and NavigationSliderVisibility it is possible to control the visibility of used NavigationCircle and NavigationSlider. With Orientation it is possible to set the orientation of the controls.

Color customization:

By default the control is created from gradients of gray. When the mouse is over button the button is colored with gradients of orange.

It is possible to customize the colors of the control with SetSelectedColor or SetMainColors methods. The first method define the colors that are used to select the buttons when the mouse is over the button. The second method also sets all other colors and can be used to completely change the colors used for the control.

It is also possible to provide your own ResourceDictionary with custom colors and brushes. See samples that come with the control for more.

See Also