NumberStyle

NumberStyle enumeration

Specifies the number style for a list, footnotes and endnotes, page numbers.

public enum NumberStyle

Values

NameValueDescription
Arabic0Arabic numbering (1, 2, 3, …)
UppercaseRoman1Upper case Roman (I, II, III, …)
LowercaseRoman2Lower case Roman (i, ii, iii, …)
UppercaseLetter3Upper case Letter (A, B, C, …)
LowercaseLetter4Lower case letter (a, b, c, …)
Ordinal5Ordinal (1st, 2nd, 3rd, …)
Number6Numbered (One, Two, Three, …)
OrdinalText7Ordinal (text) (First, Second, Third, …)
Hex8Hexadecimal: 8, 9, A, B, C, D, E, F, 10, 11, 12
ChicagoManual9Chicago Manual of Style: *, †, †
Kanji10Ideograph-digital
KanjiDigit11Japanese counting
AiueoHalfWidth12Aiueo
IrohaHalfWidth13Iroha
ArabicFullWidth14Full-width Arabic: 1, 2, 3, 4
ArabicHalfWidth15Half-width Arabic: 1, 2, 3, 4
KanjiTraditional16Japanese legal
KanjiTraditional217Japanese digital ten thousand
NumberInCircle18Enclosed circles
DecimalFullWidth19Decimal full width: 1, 2, 3, 4
Aiueo20Aiueo full width
Iroha21Iroha full width
LeadingZero22Leading Zero (01, 02,…, 09, 10, 11,…, 99, 100, 101,…)
Bullet23Bullet (check the character code in the text)
Ganada24Korean Ganada
Chosung25Korea Chosung
GB126Enclosed full stop
GB227Enclosed parenthesis
GB328Enclosed circle Chinese
GB429Ideograph enclosed circle
Zodiac130Ideograph traditional
Zodiac231Ideograph Zodiac
Zodiac332Ideograph Zodiac traditional
TradChinNum133Taiwanese counting
TradChinNum234Ideograph legal traditional
TradChinNum335Taiwanese counting thousand
TradChinNum436Taiwanese digital
SimpChinNum137Chinese counting
SimpChinNum238Chinese legal simplified
SimpChinNum339Chinese counting thousand
SimpChinNum440Chinese (not implemented)
HanjaRead41Korean digital
HanjaReadDigit42Korean counting
Hangul43Korea legal
Hanja44Korea digital2
Hebrew145Hebrew-1
Arabic146Arabic alpha
Hebrew247Hebrew-2
Arabic248Arabic abjad
HindiLetter149Hindi vowels
HindiLetter250Hindi consonants
HindiArabic51Hindi numbers
HindiCardinalText52Hindi descriptive (cardinals)
ThaiLetter53Thai letters
ThaiArabic54Thai numbers
ThaiCardinalText55Thai descriptive (cardinals)
VietCardinalText56Vietnamese descriptive (cardinals)
NumberInDash57Page number format: - 1 -, - 2 -, - 3 -, - 4 -
LowercaseRussian58Lowercase Russian alphabet
UppercaseRussian59Uppercase Russian alphabet
None255No bullet or number.
Custom65280Custom number format. It is supported by DOCX format only.

Examples

Shows how to apply custom list formatting to paragraphs when using DocumentBuilder.

Document doc = new Document();

// A list allows us to organize and decorate sets of paragraphs with prefix symbols and indents.
// We can create nested lists by increasing the indent level. 
// We can begin and end a list by using a document builder's "ListFormat" property. 
// Each paragraph that we add between a list's start and the end will become an item in the list.
// Create a list from a Microsoft Word template, and customize the first two of its list levels.
List list = doc.Lists.Add(ListTemplate.NumberDefault);

ListLevel listLevel = list.ListLevels[0];
listLevel.Font.Color = Color.Red;
listLevel.Font.Size = 24;
listLevel.NumberStyle = NumberStyle.OrdinalText;
listLevel.StartAt = 21;
listLevel.NumberFormat = "\x0000";

listLevel.NumberPosition = -36;
listLevel.TextPosition = 144;
listLevel.TabPosition = 144;

listLevel = list.ListLevels[1];
listLevel.Alignment = ListLevelAlignment.Right;
listLevel.NumberStyle = NumberStyle.Bullet;
listLevel.Font.Name = "Wingdings";
listLevel.Font.Color = Color.Blue;
listLevel.Font.Size = 24;

// This NumberFormat value will create star-shaped bullet list symbols.
listLevel.NumberFormat = "\xf0af";
listLevel.TrailingCharacter = ListTrailingCharacter.Space;
listLevel.NumberPosition = 144;

// Create paragraphs and apply both list levels of our custom list formatting to them.
DocumentBuilder builder = new DocumentBuilder(doc);

builder.ListFormat.List = list;
builder.Writeln("The quick brown fox...");
builder.Writeln("The quick brown fox...");

builder.ListFormat.ListIndent();
builder.Writeln("jumped over the lazy dog.");
builder.Writeln("jumped over the lazy dog.");

builder.ListFormat.ListOutdent();
builder.Writeln("The quick brown fox...");

builder.ListFormat.RemoveNumbers();

builder.Document.Save(ArtifactsDir + "Lists.CreateCustomList.docx");

See Also