Back to Devexpress

ImageListBullet Class

officefileapi-devexpress-dot-docs-dot-presentation-6bac0c84.md

latest3.6 KB
Original Source

ImageListBullet Class

A bullet that is displayed using an image.

Namespace : DevExpress.Docs.Presentation

Assembly : DevExpress.Docs.Presentation.v25.2.dll

NuGet Package : DevExpress.Docs.Presentation

Declaration

csharp
public class ImageListBullet :
    ListBullet
vb
Public Class ImageListBullet
    Inherits ListBullet

The following members return ImageListBullet objects:

Remarks

The following code snippet configures an image bullet for a paragraph:

csharp
using DevExpress.Docs;
using DevExpress.Docs.Presentation;
using DevExpress.Drawing;
using System.Drawing;

namespace PresentationApiSample;

public class Program {
    public static void Main(string[] _) {
        Presentation presentation = new Presentation();
        presentation.Slides.Clear();

        Slide slide = new Slide(SlideLayoutType.Blank);
        presentation.Slides.Add(slide);

        Shape shape = new Shape(ShapeType.Rectangle, 30, 30, 2000, 1000);
        slide.Shapes.Add(shape);

        // Use an image bullet for a text paragraph
        Stream stream = new FileStream(@"..\..\..\data\image.png", FileMode.Open, FileAccess.Read);
        ImageListBullet i_bullet = new ImageListBullet { Image = new OfficeImage(DXImage.FromStream(stream)) };

        TextParagraph paragraph2 = new TextParagraph();
        paragraph2.Properties.ListBullet = i_bullet;
        paragraph2.Text = "Paragraph 2";
        shape.TextArea.Paragraphs.Add(paragraph2);

    }
}
vb
Imports DevExpress.Docs
Imports DevExpress.Docs.Presentation
Imports DevExpress.Drawing
Imports System.Drawing

Namespace PresentationApiSample

    Public Class Program
        Public Shared Sub Main(__ As String())

            Dim presentation As Presentation = New Presentation()
            presentation.Slides.Clear()

            Dim slide As Slide = New Slide(SlideLayoutType.Blank)
            presentation.Slides.Add(slide)

            Dim shape As Shape = New Shape(ShapeType.Rectangle, 30, 30, 2000, 1000)
            slide.Shapes.Add(shape)

            ' Use an image bullet for a text paragraph
            Dim stream As Stream = New FileStream("..\..\..\data\image.png", FileMode.Open, FileAccess.Read)
            Dim i_bullet As ImageListBullet = New ImageListBullet With {
                    .Image = New OfficeImage(DXImage.FromStream(stream))
                }
            Dim paragraph2 As TextParagraph = New TextParagraph()
            paragraph2.Properties.ListBullet = i_bullet
            paragraph2.Text = "Paragraph 2"
            shape.TextArea.Paragraphs.Add(paragraph2)

        End Sub
    End Class
End Namespace

Implements

ICloneable

Inheritance

Object PresentationObject ListBullet ImageListBullet

See Also

ImageListBullet Members

DevExpress.Docs.Presentation Namespace