We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to create the deep level numbering( 1.1-1.2.1-1.2.2 etc.) using DocIO?

 

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

 

Article ID: Published Date: Last Revised Date: Platform: Control:
289 04/30/2011 07/10/2014 Windows Forms DocIO
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.