Click or drag to resize

ZoomPanelCalculateVisibleArea Method

Calculates the visible area that would be shown if ZoomPanel.Viewbox would be (0,0,1,1).

Namespace:  Ab2d.Controls
Assembly:  Ab2d.Controls.ZoomPanel (in Ab2d.Controls.ZoomPanel.dll) Version: 5.2.6631.1040
Syntax
C#
public bool CalculateVisibleArea(
	out Rect relativeVisibleArea,
	out Rect absoluteVisibleArea
)

Parameters

relativeVisibleArea
Type: System.WindowsRect
out: relativeVisibleArea
absoluteVisibleArea
Type: System.WindowsRect
out: absoluteVisibleArea in the coordinates of the content

Return Value

Type: Boolean
if false the visible area cannot be calculated
Remarks

This method calculates the visible area that is would be shown if ZoomPanel.Viewbox would be (0,0,1,1).

The relativeVisibleArea is different from the Viewbox because the Viewbox property does not reflect the different aspect ration of ZoomPanel and its content. The relativeVisibleArea reflects how much empty space is around the content when the whole content is shown (Viewbox=0,0,1,1).

Examples

ZoomPanel size: width = 200, height = 300
Content size: width = 2000, height = 1000

Results:
relativeVisibleArea = (0, -1, 1, 3) - the height is increased 3 times to show the whole content
absoluteVisibleArea = (0, -1000, 2000, 3000) - in content units the size of the whole shown area is 2000 x 3000

See Also