Table of Contents

Class Div

Namespace
iText.Layout.Element
Assembly
itext.layout.dll

A Div is a container object that defines a section in a document, which will have some shared layout properties.

public class Div : BlockElement<Div>, IAccessibleElement, IBlockElement, IAbstractElement, IElement, IPropertyContainer
Inheritance
Div
Implements
Derived
Inherited Members

Remarks

A Div is a container object that defines a section in a document, which will have some shared layout properties. Like all BlockElement<T> types, it will try to take up as much horizontal space as possible.

The concept is very similar to that of the div tag in HTML.

Constructors

Div()

public Div()

Fields

tagProperties

protected DefaultAccessibilityProperties tagProperties

Field Value

DefaultAccessibilityProperties

Methods

Add(AreaBreak)

Adds an area break to the div's contents.

public virtual Div Add(AreaBreak areaBreak)

Parameters

areaBreak AreaBreak

an AreaBreak

Returns

Div

this Element

Add(IBlockElement)

Adds any block element to the div's contents.

public virtual Div Add(IBlockElement element)

Parameters

element IBlockElement

a BlockElement<T>

Returns

Div

this Element

Add(Image)

Adds an image to the div's contents.

public virtual Div Add(Image element)

Parameters

element Image

an Image

Returns

Div

this Element

GetAccessibilityProperties()

public override AccessibilityProperties GetAccessibilityProperties()

Returns

AccessibilityProperties

MakeNewRenderer()

protected override IRenderer MakeNewRenderer()

Returns

IRenderer

SetFillAvailableArea(bool)

Defines whether the Div should occupy all the space left in the available area in case it is the last element in this area.

public virtual Div SetFillAvailableArea(bool fillArea)

Parameters

fillArea bool

defines whether the available area should be filled

Returns

Div

this Div

SetFillAvailableAreaOnSplit(bool)

Defines whether the Div should occupy all the space left in the available area in case the area has been split and it is the last element in the split part of this area.

public virtual Div SetFillAvailableAreaOnSplit(bool fillAreaOnSplit)

Parameters

fillAreaOnSplit bool

defines whether the available area should be filled

Returns

Div

this Div