2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
DocIO support to create deep level numbering by specifying the Numberprefix and LineIndent property. The following code snippet illustrate how to create the list style for deep level numbering. C# //Add new list style to the document ListStylestyleN = document.AddListStyle(ListType.Numbered, "ListStyleN"); //Create new level0 to the list WListLevellistLevelL0 = styleN.Levels[0]; //Set the character and paragraph formating for the level listLevelL0.CharacterFormat.FontSize = 16; listLevelL0.CharacterFormat.Bold = true; listLevelL0.CharacterFormat.Italic = true; listLevelL0.ParagraphFormat.LeftIndent = 0; listLevelL0.ParagraphFormat.FirstLineIndent = 20; //Create a new level1 to the list WListLevellistLevelL1 = styleN.Levels[1]; //Turns the numbering format to arabic listLevelL1.IsLegalStyleNumbering = true; //Numberprefix defines prefix before numbering. //\x0000 - defines that numbering of the previous level will be inherited listLevelL1.NumberPrefix = "\x0000."; //Set the indenting position of the level listLevelL1.ParagraphFormat.LeftIndent = 70; listLevelL1.ParagraphFormat.FirstLineIndent = -10;
WListLevellistLevelL2 = styleN.Levels[2]; listLevelL2.IsLegalStyleNumbering = true; //\x0000.\x0001. - inherirs numbering of level 0 and 1 listLevelL2.NumberPrefix = "\x0000.\x0001."; listLevelL2.ParagraphFormat.LeftIndent = 130; listLevelL2.ParagraphFormat.FirstLineIndent = -40;
VB 'Add new list style to the document DimstyleN As ListStyle = document.AddListStyle(ListType.Numbered, "ListStyleN") 'Create new level0 to the list DimlistLevelL0 As WListLevel = styleN.Levels(0) 'Set the character and paragraph formating for the level listLevelL0.CharacterFormat.FontSize = 16 listLevelL0.CharacterFormat.Bold = True listLevelL0.CharacterFormat.Italic = True listLevelL0.ParagraphFormat.LeftIndent = 0 listLevelL0.ParagraphFormat.FirstLineIndent = 20 'Create a new level1 to the list DimlistLevelL1 As WListLevel = styleN.Levels(1) 'Turns the numbering format to arabic listLevelL1.IsLegalStyleNumbering = True ''Numberprefix defines prefix before numbering. ''\x0000 - defines that numbering of the previous level will be inherited listLevelL1.NumberPrefix = ChrW(&H0).ToString() & "." 'Set the indenting position of the level listLevelL1.ParagraphFormat.LeftIndent = 70 listLevelL1.ParagraphFormat.FirstLineIndent = -10 DimlistLevelL2 As WListLevel = styleN.Levels(2) listLevelL2.IsLegalStyleNumbering = True ''\x0000.\x0001. - inherirs numbering of level 0 and 1 listLevelL2.NumberPrefix = ChrW(&H0).ToString() & "." & ChrW(&H1).ToString() & "." listLevelL2.ParagraphFormat.LeftIndent = 130 listLevelL2.ParagraphFormat.FirstLineIndent = -40
http://help.syncfusion.com/samples/DocIO.Windows/DocIO_DeepLevelNumbering/main.htm
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.