Interface IListFormat
Represents a list or bullet formatting options.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface IListFormat
Properties
BulletCharacter
Gets or sets the Unicode character value that is used for bullets in the specified text.
Declaration
char BulletCharacter { get; set; }
Property Value
Type | Description |
---|---|
System.Char | The character. |
Examples
//Create a new presentation instance.
IPresentation presentation = Presentation.Create();
//Add the slide into the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
// Add a text box to hold the list
IShape textBoxShape = slide.AddTextBox(65, 140, 410, 270);
// Add a new paragraph with the text in the left hand side text box.
IParagraph paragraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
//Set the list level as 1
paragraph.IndentLevelNumber = 1;
// Set the hanging value
paragraph.FirstLineIndent = -20;
//Create list format instance for the paragraph
IListFormat listFormat = paragraph.ListFormat;
//Set the type of list
listFormat.Type = ListType.Bulleted;
//Set the character for bullet
listFormat.BulletCharacter = '♠';
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation instance.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add the slide into the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
' Add a text box to hold the list
Dim textBoxShape As IShape = slide.AddTextBox(65, 140, 410, 270)
' Add a new paragraph with the text in the left hand side text box.
Dim paragraph As IParagraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
'Set the list level as 1
paragraph.IndentLevelNumber = 1
' Set the hanging value
paragraph.FirstLineIndent = -20
'Create list format instance for the paragraph
Dim listFormat As IListFormat = paragraph.ListFormat
'Set the type of list
listFormat.Type = ListType.Bulleted
'Set the character for bullet
listFormat.BulletCharacter = "♠"C
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Color
Gets or sets the color of IColor instance.
Declaration
IColor Color { get; set; }
Property Value
Type | Description |
---|---|
IColor | The color. |
Examples
//Create a new presentation instance.
IPresentation presentation = Presentation.Create();
//Add the slide into the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
// Add a text box to hold the list
IShape textBoxShape = slide.AddTextBox(65, 140, 410, 270);
//Add another paragraph to the text body
IParagraph paragraph = textBoxShape.TextBody.AddParagraph("Reynold Xin, PhD student at UC Berkeley AMPLab");
//Set the list level as 1
paragraph.IndentLevelNumber = 1;
// Set the hanging value
paragraph.FirstLineIndent = -20;
//Create list format instance for the paragraph
IListFormat listFormat = paragraph.ListFormat;
//Set the type of list
listFormat.Type = ListType.Bulleted;
//Set the character for bullet
listFormat.BulletCharacter = '♠';
//Set the color of the bullet
listFormat.Color = ColorObject.FromArgb(23, 12, 234);
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation instance.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add the slide into the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
' Add a text box to hold the list
Dim textBoxShape As IShape = slide.AddTextBox(65, 140, 410, 270)
'Add another paragraph to the text body
Dim paragraph As IParagraph = textBoxShape.TextBody.AddParagraph("Reynold Xin, PhD student at UC Berkeley AMPLab")
'Set the list level as 1
paragraph.IndentLevelNumber = 1
' Set the hanging value
paragraph.FirstLineIndent = -20
'Create list format instance for the paragraph
Dim listFormat As IListFormat = paragraph.ListFormat
'Set the type of list
listFormat.Type = ListType.Bulleted
'Set the character for bullet
listFormat.BulletCharacter = "♠"C
'Set the color of the bullet
listFormat.Color = ColorObject.FromArgb(23, 12, 234)
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
FontName
Gets or sets the font name for the list.
Declaration
string FontName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the font. |
Examples
//Create a new presentation instance.
IPresentation presentation = Presentation.Create();
//Add the slide into the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
// Add a text box to hold the list
IShape textBoxShape = slide.AddTextBox(65, 140, 410, 270);
//Add another paragraph to the text body
IParagraph paragraph = textBoxShape.TextBody.AddParagraph("Reynold Xin, PhD student at UC Berkeley AMPLab");
//Set the list level as 1
paragraph.IndentLevelNumber = 1;
// Set the hanging value
paragraph.FirstLineIndent = -20;
//Create list format instance for the paragraph
IListFormat listFormat = paragraph.ListFormat;
//Set the type of list
listFormat.Type = ListType.Bulleted;
//Set font name for the bullet
listFormat.FontName = "Helvetica";
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation instance.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add the slide into the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
' Add a text box to hold the list
Dim textBoxShape As IShape = slide.AddTextBox(65, 140, 410, 270)
'Add another paragraph to the text body
Dim paragraph As IParagraph = textBoxShape.TextBody.AddParagraph("Reynold Xin, PhD student at UC Berkeley AMPLab")
'Set the list level as 1
paragraph.IndentLevelNumber = 1
' Set the hanging value
paragraph.FirstLineIndent = -20
'Create list format instance for the paragraph
Dim listFormat As IListFormat = paragraph.ListFormat
'Set the type of list
listFormat.Type = ListType.Bulleted
'Set font name for the bullet
listFormat.FontName = "Helvetica"
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
NumberStyle
Declaration
NumberedListStyle NumberStyle { get; set; }
Property Value
Type | Description |
---|---|
NumberedListStyle | The number style. |
Examples
//Create a new presentation instance.
IPresentation presentation = Presentation.Create();
//Add the slide into the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
// Add a text box to hold the list
IShape textBoxShape = slide.AddTextBox(65, 140, 410, 270);
// Add a new paragraph with the text in the left hand side text box.
IParagraph paragraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
//Set the list level as 1
paragraph.IndentLevelNumber = 1;
// Set the hanging value
paragraph.FirstLineIndent = -20;
//Create instance for list format
IListFormat listFormat = paragraph.ListFormat;
//Set the list type as Numbered
listFormat.Type = ListType.Numbered;
//Set the numbered style (list numbering) as Arabic number following by period.
listFormat.NumberStyle = NumberedListStyle.ArabicPeriod;
//Set the starting value as 1
listFormat.StartValue = 1;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation instance.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add the slide into the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
' Add a text box to hold the list
Dim textBoxShape As IShape = slide.AddTextBox(65, 140, 410, 270)
' Add a new paragraph with the text in the left hand side text box.
Dim paragraph As IParagraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
'Set the list level as 1
paragraph.IndentLevelNumber = 1
' Set the hanging value
paragraph.FirstLineIndent = -20
'Create instance for list format
Dim listFormat As IListFormat = paragraph.ListFormat
'Set the list type as Numbered
listFormat.Type = ListType.Numbered
'Set the numbered style (list numbering) as Arabic number following by period.
listFormat.NumberStyle = NumberedListStyle.ArabicPeriod
'Set the starting value as 1
listFormat.StartValue = 1
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Size
Gets or sets the list size relative to the size of the first text character in the paragraph.
Declaration
float Size { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The size. |
Examples
//Create a new presentation instance.
IPresentation presentation = Presentation.Create();
//Add the slide into the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
// Add a text box to hold the list
IShape textBoxShape = slide.AddTextBox(65, 140, 410, 270);
// Add a new paragraph with the text in the left hand side text box.
IParagraph paragraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
//Set the list level as 1
paragraph.IndentLevelNumber = 1;
// Set the hanging value
paragraph.FirstLineIndent = -20;
//Create instance for list format
IListFormat listFormat = paragraph.ListFormat;
//Set the list type as Numbered
listFormat.Type = ListType.Numbered;
//Set the numbered style (list numbering) as Arabic number following by period.
listFormat.NumberStyle = NumberedListStyle.ArabicPeriod;
//Set the starting value as 1
listFormat.StartValue = 1;
// Set the bullet character size. If 100, here means 100% of its text. Possible values can range from 25 to 400
listFormat.Size = 100;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation instance.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add the slide into the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
' Add a text box to hold the list
Dim textBoxShape As IShape = slide.AddTextBox(65, 140, 410, 270)
' Add a new paragraph with the text in the left hand side text box.
Dim paragraph As IParagraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
'Set the list level as 1
paragraph.IndentLevelNumber = 1
' Set the hanging value
paragraph.FirstLineIndent = -20
'Create instance for list format
Dim listFormat As IListFormat = paragraph.ListFormat
'Set the list type as Numbered
listFormat.Type = ListType.Numbered
'Set the numbered style (list numbering) as Arabic number following by period.
listFormat.NumberStyle = NumberedListStyle.ArabicPeriod
'Set the starting value as 1
listFormat.StartValue = 1
' Set the bullet character size. If 100, here means 100% of its text. Possible values can range from 25 to 400
listFormat.Size = 100
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
StartValue
Declaration
int StartValue { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The start value. |
Examples
//Create a new presentation instance.
IPresentation presentation = Presentation.Create();
//Add the slide into the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
// Add a text box to hold the list
IShape textBoxShape = slide.AddTextBox(65, 140, 410, 270);
// Add a new paragraph with the text in the left hand side text box.
IParagraph paragraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
//Set the list level as 1
paragraph.IndentLevelNumber = 1;
// Set the hanging value
paragraph.FirstLineIndent = -20;
//Create instance for list format
IListFormat listFormat = paragraph.ListFormat;
//Set the list type as Numbered
listFormat.Type = ListType.Numbered;
//Set the numbered style (list numbering) as Arabic number following by period.
listFormat.NumberStyle = NumberedListStyle.ArabicPeriod;
//Set the starting value as 10
listFormat.StartValue = 10;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation instance.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add the slide into the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
' Add a text box to hold the list
Dim textBoxShape As IShape = slide.AddTextBox(65, 140, 410, 270)
' Add a new paragraph with the text in the left hand side text box.
Dim paragraph As IParagraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
'Set the list level as 1
paragraph.IndentLevelNumber = 1
' Set the hanging value
paragraph.FirstLineIndent = -20
'Create instance for list format
Dim listFormat As IListFormat = paragraph.ListFormat
'Set the list type as Numbered
listFormat.Type = ListType.Numbered
'Set the numbered style (list numbering) as Arabic number following by period.
listFormat.NumberStyle = NumberedListStyle.ArabicPeriod
'Set the starting value as 10
listFormat.StartValue = 10
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Type
Gets or sets the ListType.
Declaration
ListType Type { get; set; }
Property Value
Type | Description |
---|---|
ListType | The type. |
Examples
//Create a new presentation instance.
IPresentation presentation = Presentation.Create();
//Add the slide into the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
// Add a text box to hold the list
IShape textBoxShape = slide.AddTextBox(65, 140, 410, 270);
//Add another paragraph to the text body
IParagraph paragraph = textBoxShape.TextBody.AddParagraph("Reynold Xin, PhD student at UC Berkeley AMPLab");
//Set the list level as 1
paragraph.IndentLevelNumber = 1;
// Set the hanging value
paragraph.FirstLineIndent = -25;
//Retrieve the list format of paragraph
IListFormat listFormat = paragraph.ListFormat;
//Set the list type as Numbered
listFormat.Type = ListType.Numbered;
//Set the numbered style (list numbering) as Arabic number following by period.
listFormat.NumberStyle = NumberedListStyle.ArabicPeriod;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation instance.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add the slide into the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
' Add a text box to hold the list
Dim textBoxShape As IShape = slide.AddTextBox(65, 140, 410, 270)
'Add another paragraph to the text body
Dim paragraph As IParagraph = textBoxShape.TextBody.AddParagraph("Reynold Xin, PhD student at UC Berkeley AMPLab")
'Set the list level as 1
paragraph.IndentLevelNumber = 1
' Set the hanging value
paragraph.FirstLineIndent = -25
'Retrieve the list format of paragraph
Dim listFormat As IListFormat = paragraph.ListFormat
'Set the list type as Numbered
listFormat.Type = ListType.Numbered
'Set the numbered style (list numbering) as Arabic number following by period.
listFormat.NumberStyle = NumberedListStyle.ArabicPeriod
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Methods
Picture(Stream)
Declaration
void Picture(Stream picStream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | picStream | The picture stream. |
Examples
//Create a new presentation instance.
IPresentation presentation = Presentation.Create();
//Add the slide into the presentation
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
// Add a text box to hold the list
IShape textBoxShape = slide.AddTextBox(65, 140, 410, 270);
// Add a new paragraph with the text in the left hand side text box.
IParagraph paragraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
//Set the list type as Numbered
paragraph.ListFormat.Type = ListType.Picture;
//Set the image for the list.
paragraph.ListFormat.Picture(new MemoryStream(Syncfusion.Drawing.Image.FromFile("Image.gif").ImageData));
// Set the picture size. If 100, here means 100% of its text. Possible values can range from 25 to 400
paragraph.ListFormat.Size = 150;
//Set the list level as 1
paragraph.IndentLevelNumber = 1;
// Set the hanging value
paragraph.FirstLineIndent = -20;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation
presentation.Close();
'Create a new presentation instance.
Dim presentation__1 As IPresentation = Presentation.Create()
'Add the slide into the presentation
Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
' Add a text box to hold the list
Dim textBoxShape As IShape = slide.AddTextBox(65, 140, 410, 270)
' Add a new paragraph with the text in the left hand side text box.
Dim paragraph As IParagraph = textBoxShape.TextBody.AddParagraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
'Set the list type as Numbered
paragraph.ListFormat.Type = ListType.Picture
'Set the image for the list.
paragraph.ListFormat.Picture(New MemoryStream(Syncfusion.Drawing.Image.FromFile("Image.gif").ImageData))
' Set the picture size. If 100, here means 100% of its text. Possible values can range from 25 to 400
paragraph.ListFormat.Size = 150
'Set the list level as 1
paragraph.IndentLevelNumber = 1
' Set the hanging value
paragraph.FirstLineIndent = -20
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()