Click or drag to resize

ZoomPanelCenterPosition Property

Gets or sets the position that specifies which point of the content will be positioned in the center of the ZoomPanel. The value is in the units (Absolute / Relative) specified by the CenterPositionUnits property.

Namespace:  Ab2d.Controls
Assembly:  Ab2d.Controls.ZoomPanel (in Ab2d.Controls.ZoomPanel.dll) Version: 5.2.6631.1040
Syntax
C#
public Point CenterPosition { get; set; }

Property Value

Type: Point
Remarks

CenterPosition gets or sets the position that specifies which point of the content will be positioned in the center of the ZoomPanel. The value is in the units (Absolute / Relative) specified by the CenterPositionUnits property.

When the units are Relative the CenterPosition is specified relatively to the ZoomPanel's content. For example:
(0.5 0.5) means the center point of the content,
(1.0 0.5) means the most right point in the vertical center of the content,
(0.2 0.3) means a point that is 20% right from the left edge and 30% down from the top of the content.

When the units are Absolute the CenterPosition is defined by the size of the content. For example the point (100 200) means that the point of the content that is at coordinates 100, 200 will be shown in the center of the ZoomPanel.

With CenterPosition and ZoomFactor it is possible to define which area and at which zoom will be shown. Both properties fully defined the Viewboxproperty that is internally used to define which part of the ZoomPanel will be used.

Please note that when changing both CenterPosition and CenterPositionUnits, you need to firstly change the CenterPositionUnits. This way the viewbox will be calculated from CenterPosition in the correct units.

See Also