Render Areas

Although any render object can contain other render objects as its children, there is one render object designed specifically as a container for other objects – RenderArea. The primary difference between a render area and other render objects (such a render text) is that for a render area, specifying either of its width or height as Auto means that the corresponding dimension is determined by the size of the children, while for other types of objects, auto size is determined by the object's own content (text size for a RenderText, image size for a RenderImage, and so on).

By default, when a new render area is created, its Width is equal to the width of its parent (so a top-level render area stretches across the whole page – or across the current column for multi-column layouts). The Height of a render area, on the other hand, is by default set to Auto (Unit.Auto), and is determined by the combined height of the render area's children. So the default behavior of a top-level render area is to take up the whole page width, and stretch down as needed (possibly spanning multiple pages) to accommodate all its content. You can set the Width of a render area to auto (Unit.Auto), in which case it will adjust to accommodate the combined widths of the area's children. In this case, if the combined width of the area's children exceeds the width of the page, horizontal page breaks will occur, adding extension pages to the right of the current page. To prevent horizontal page breaks (clipping the area on the right if necessary), set the area's CanSplitHorz property to False (it is True by default).


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.