Click or drag to resize

ZoomPanelActualViewbox Property

Gets the Rect that describes the area of the content that is actually visible on the screen.

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

Property Value

Type: Rect
Remarks

ActualViewbox value can be different from Viewbox because of different aspect ratios of the ViewboxEx, content and Viewbox.

For example if we are showing a 100 x 100 Rectangle inside 200 x 100 ViewboxEx and Viewbox property is (0,0,1,1) than because ViewboxEx is wider as content Rectangle, the Rectangle will be centered inside ViewboxEx with some empty space on the left and right. In this case the ActualViewbox would be (-0.5, 0, 2, 1).

This would mean that the actually visible area is 2 times as wide as the Rectangle (ActualViewbox.Width = 2). The actually visible area is starting half the size of Rectangle to the left (ActualViewbox.X = 0.5). There is no empty space below or above the shown Rectangle (ActualViewbox.Y = 0 and ActualViewbox.Height = 1).

See Also