Click or drag to resize

ZoomPanelSetZoomNow Method

Sets the area visible with ZoomPanel without animating the change.
Overload List
  NameDescription
Public methodSetZoomNow(Double)
Sets the zoom area to the currently set CenterPosition and the zoomFactor parameter. The zoom area is changed immediately regardless of the IsAnimated property.
Public methodSetZoomNow(Point)
Sets the zoom area to centerPosition parameter (in the current CenterPositionUnits) and the currently set ZoomFactor. The zoom area is changed immediately regardless of the IsAnimated property.
Public methodCode exampleSetZoomNow(Rect)
Sets the zoom area to the new viewbox. The zoom area is changed immediately regardless of the IsAnimated property.
Public methodSetZoomNow(Point, Double)
Sets the zoom area to centerPosition parameter (in the current CenterPositionUnits) and the zoomFactor parameter. The zoom area is changed immediately regardless of the IsAnimated property.
Public methodSetZoomNow(Rect, Double)
Sets the zoom area to the new viewbox. If IsAnimated property is true, the zoom area change is animated.
Public methodSetZoomNow(Point, ZoomPanelCenterPositionUnitsType, Double)
Sets the zoom area based on centerPosition, units and zoomFactor parameters. The zoom area is changed immediately regardless of the IsAnimated property.
Public methodSetZoomNow(Point, ZoomPanelCenterPositionUnitsType, Double, Double)
Sets the zoom area based on centerPosition, units and zoomFactor parameters. The zoom area is changed immediately regardless of the IsAnimated property.
Top
Remarks

SetZoomNow is the most common method to change the area visible with ZoomPanel.

The method makes the change immediately without animating it. To animate the change use SetZoom method (make sure that the IsAnimated property is true).

The method has many overloads that can be used to specify the new visible area by new viewbox, rotation angle, zoom factor and center position.

Examples

The following example sets the new visible area to the right upper quarter of the content (position: 0.5, 0; size: 0.5, 0.5):

ZoomPanel1.SetZoomNow(new Rect(0.5, 0, 0.5, 0.5));

The following example shows the same area but this time set with using zoom factor (4) and center position (0.75, 0.25):

ZoomPanel1.SetZoomNow(new Point(0.75, 0.25), Ab2d.Controls.ZoomPanel.CenterPositionUnitsType.Relative, 4);
See Also