DeletePictureBullet

ListLevel.DeletePictureBullet method

Deletes picture bullet for the current list level.

public void DeletePictureBullet()

Remarks

Default bullet will be shown after deleting.

Examples

Shows how to set a custom image icon for list item labels.

Document doc = new Document();

List list = doc.Lists.Add(ListTemplate.BulletCircle);

// Create a picture bullet for the current list level, and set an image from a local file system
// as the icon that the bullets for this list level will display.
list.ListLevels[0].CreatePictureBullet();
list.ListLevels[0].ImageData.SetImage(ImageDir + "Logo icon.ico");

Assert.IsTrue(list.ListLevels[0].ImageData.HasImage);

DocumentBuilder builder = new DocumentBuilder(doc);

builder.ListFormat.List = list;
builder.Writeln("Hello world!");
builder.Write("Hello again!");

doc.Save(ArtifactsDir + "Lists.CreatePictureBullet.docx");

list.ListLevels[0].DeletePictureBullet();

Assert.IsNull(list.ListLevels[0].ImageData);

See Also