# RtfListDefinition

RTF list definition from the list table.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[RtfListDefinition.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfListDefinition.cs#L7)

**Implements**

`IRtfCloneable`

**Modifiers**

sealed

RTF list definition from the list table.

## Inheritance

- object
- RtfListDefinition

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Method [RtfDocument.AddListDefinition](/api/rtf/officeimo-rtf-rtfdocument/#method-addlistdefinition-int32-string)
- Property [RtfDocument.ListDefinitions](/api/rtf/officeimo-rtf-rtfdocument/#property-listdefinitions)

Filter members 

Show inherited

## Constructors

`public RtfListDefinition(int id)` [#](#constructor-ctor-int32)

[RtfListDefinition.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfListDefinition.cs#L7)

Creates a list definition.

Parameters

**id int required**

## Methods

`public RtfListLevel AddLevel(RtfListKind kind = Decimal)` [#](#method-addlevel-officeimo-rtf-rtflistkind)

[RtfListDefinition.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfListDefinition.cs#L28)

Adds a list level.

Parameters

**kind OfficeIMO.Rtf.RtfListKind = Decimal optional**

Returns

`RtfListLevel`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public int Id { get; internal set; }` [#](#property-id)

[RtfListDefinition.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfListDefinition.cs#L15)

List definition id referenced by list overrides.

`public int? TemplateId { get; set; }` [#](#property-templateid)

[RtfListDefinition.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfListDefinition.cs#L18)

Optional template id.

`public string? Name { get; set; }` [#](#property-name)

[RtfListDefinition.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfListDefinition.cs#L21)

Optional list name.

`public IReadOnlyList<RtfListLevel> Levels { get; }` [#](#property-levels)

[RtfListDefinition.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfListDefinition.cs#L24)

List levels in definition order.

<!-- PowerForge markdown artifact sha256:11B53429B9CF8A06E3455A5C7251119F5AE814459D290E28ED015A327AC8BCF4 -->
