FillFormat

IBulletFormatEffectiveData.FillFormat property

Returns the bullet fill format of a paragraph. Read-only IFillFormatEffectiveData.

public IFillFormatEffectiveData FillFormat { get; }

Examples

This example demonstrates retrieving bullet’s fill effective data.

[C#]
using (Presentation pres = new Presentation("SomePresentation.pptx"))
{
    // Assume that the first shape on the first slide is AutoShape with some text...
    // Output information about text paragraphs' bullets
    AutoShape autoShape = (AutoShape)pres.Slides[0].Shapes[0];
    foreach (Paragraph para in autoShape.TextFrame.Paragraphs)
    {
        IBulletFormatEffectiveData bulletFormatEffective = para.ParagraphFormat.Bullet.GetEffective();
        Console.WriteLine("Bullet type: " + bulletFormatEffective.Type);
        if (bulletFormatEffective.Type != BulletType.None)
        {
            Console.WriteLine("Bullet fill type: " + bulletFormatEffective.FillFormat.FillType);
            switch (bulletFormatEffective.FillFormat.FillType)
            {
                case FillType.Solid:
                    Console.WriteLine("Solid fill color: " + bulletFormatEffective.FillFormat.SolidFillColor);
                    break;
                case FillType.Gradient:
                    Console.WriteLine("Gradient stops count: " + bulletFormatEffective.FillFormat.GradientFormat.GradientStops.Count);
                    foreach (IGradientStopEffectiveData gradStop in bulletFormatEffective.FillFormat.GradientFormat.GradientStops)
                        Console.WriteLine(gradStop.Position + ": " + gradStop.Color);
                    break;
                case FillType.Pattern:
                    Console.WriteLine("Pattern style: " + bulletFormatEffective.FillFormat.PatternFormat.PatternStyle);
                    Console.WriteLine("Fore color: " + bulletFormatEffective.FillFormat.PatternFormat.ForeColor);
                    Console.WriteLine("Back color: " + bulletFormatEffective.FillFormat.PatternFormat.BackColor);
                    break;
            }
        }
        Console.WriteLine();
    }
}

See Also