←Select platform

GetViewBounds Method

Summary

Current bounds of the view in physical (in control pixel) coordinates.

Syntax
C#
VB
C++
publicvirtualLeadRectDGetViewBounds(boolwithPadding,boolclipped)
PublicOverridableFunctionGetViewBounds(ByValwithPaddingAsBoolean,ByValclippedAsBoolean)AsLeadRectD
public:virtualLeadRectD^ GetViewBounds(boolwithPadding,boolclipped)

Parameters

withPadding

trueto include the value ofViewPaddingwhen calculating the value, otherwise;false.

clipped

trueto intersect the returned value with the current viewer control rectangle, otherwise;false.

Return Value

The view bounds in pixels orLeadRectD.Emptyif the viewer does not have any items or if the view does not intersect with the control rectangle.

Remarks

The view consists of all current the items in the viewer plus any padding (set inViewPadding). This is the area that the viewer use to determine whether horizontal and vertical scrollbars are needed and to calculate their size and position.

The view area is calculated duringUpdateTransform. The currentViewLayoutdetermines where each item is placed and calculates their sizes. The total of these sizes is calculated and multiplied by any scale factor (XScaleFactorandYScaleFactor) set by theZoommethod. The final size is the view area.

During the calculations, the viewer will calculate the transformation matrix used when rendering the view. This matrix contains the current padding, scroll offset and scale factors and stored inViewTransform. For example, to render the view border, the viewer simply draws the value ofGetViewBoundstransformed withViewTransform.

For more information, refer to即时通讯age Viewer Appearance,即时通讯age Viewer Transformation, and即时通讯age Viewer Bounds and Transform.

Example

For an example, refer toRedirectRender.

Requirements
Target Platforms
Leadtools.Controls Assembly
188金宝搏的网址客服|Support|Contact Us|Intellectual Property Notices
© 1991-2021LEAD Technologies, Inc.All Rights Reserved.