Table of Contents

Class List

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

A List is a layout element representing a series of objects that are vertically outlined with the same or very similar layout properties, giving it a sense of unity.

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

Remarks

A List is a layout element representing a series of objects that are vertically outlined with the same or very similar layout properties, giving it a sense of unity. It contains ListItem objects that can optionally be prefixed with a symbol and/or numbered.

Constructors

List()

Creates a List with the DEFAULT_LIST_SYMBOL as a prefix.

public List()

List(ListNumberingType)

Creates a List with a custom numbering type.

public List(ListNumberingType listNumberingType)

Parameters

listNumberingType ListNumberingType

a prefix style

Fields

DEFAULT_LIST_SYMBOL

public const string DEFAULT_LIST_SYMBOL = "- "

Field Value

string

tagProperties

protected DefaultAccessibilityProperties tagProperties

Field Value

DefaultAccessibilityProperties

Methods

Add(string)

Adds a new ListItem to the bottom of the List.

public virtual List Add(string text)

Parameters

text string

textual contents of the new list item

Returns

List

this list.

Add(ListItem)

Adds a new ListItem to the bottom of the List.

public virtual List Add(ListItem listItem)

Parameters

listItem ListItem

a new list item

Returns

List

this list.

GetAccessibilityProperties()

public override AccessibilityProperties GetAccessibilityProperties()

Returns

AccessibilityProperties

GetDefaultProperty<T1>(int)

public override T1 GetDefaultProperty<T1>(int property)

Parameters

property int

Returns

T1

Type Parameters

T1

GetPostSymbolText()

Gets the piece of text that is added after the ListItem symbol.

public virtual string GetPostSymbolText()

Returns

string

the post symbol text

GetPreSymbolText()

Gets the piece of text that is added before the ListItem symbol.

public virtual string GetPreSymbolText()

Returns

string

the pre symbol text

GetSymbolIndent()

Gets the indent offset of the ListItem symbols.

public virtual float? GetSymbolIndent()

Returns

float?

the indent offset as a float.

MakeNewRenderer()

protected override IRenderer MakeNewRenderer()

Returns

IRenderer

SetItemStartIndex(int)

Customizes the index of the first item in the list.

public virtual List SetItemStartIndex(int start)

Parameters

start int

the custom index, as an int

Returns

List

this list.

SetListSymbol(string)

Sets the list symbol to be used.

public virtual List SetListSymbol(string symbol)

Parameters

symbol string

the textual symbol to be used for all items.

Returns

List

this list.

Remarks

Sets the list symbol to be used. This will create an unordered list, i.e. all list items will be shown with the same prefix.

SetListSymbol(Image)

Sets the list symbol to be used.

public virtual List SetListSymbol(Image image)

Parameters

image Image

the Image object to be used for all items.

Returns

List

this list.

Remarks

Sets the list symbol to be used. This will create an unordered list, i.e. all list items will be shown with the same prefix.

SetListSymbol(Text)

Sets the list symbol to be used.

public virtual List SetListSymbol(Text text)

Parameters

text Text

the Text object to be used for all items.

Returns

List

this list.

Remarks

Sets the list symbol to be used. This will create an unordered list, i.e. all list items will be shown with the same prefix.

SetListSymbol(ListNumberingType)

Sets the list numbering type to be used.

public virtual List SetListSymbol(ListNumberingType listNumberingType)

Parameters

listNumberingType ListNumberingType

the ListNumberingType that will generate appropriate prefixes for the ListItem s.

Returns

List

this list.

Remarks

Sets the list numbering type to be used. This will create an ordered list, i.e. every ListItem will have a unique prefix.

SetListSymbolAlignment(ListSymbolAlignment)

A specialized enum containing alignment properties for list symbols.

public virtual List SetListSymbolAlignment(ListSymbolAlignment alignment)

Parameters

alignment ListSymbolAlignment

the alignment of the list symbols

Returns

List

this element

Remarks

A specialized enum containing alignment properties for list symbols. LEFT means that the items will be aligned as follows: 9. Item 9 10. Item 10

Whereas RIGHT means the items will be aligned as follows: 9. Item 9 10. Item 10

SetPostSymbolText(string)

Sets a piece of text that should be added after the ListItem symbol.

public virtual void SetPostSymbolText(string postSymbolText)

Parameters

postSymbolText string

the post symbol text

SetPreSymbolText(string)

Sets a piece of text that should be added before the ListItem symbol.

public virtual void SetPreSymbolText(string preSymbolText)

Parameters

preSymbolText string

the pre symbol text

SetSymbolIndent(float)

Sets the indent offset of the ListItem symbols.

public virtual List SetSymbolIndent(float symbolIndent)

Parameters

symbolIndent float

the new indent offset.

Returns

List

this list.