Skip to main content
All docs
V25.2
  • Table.Fill Property

    Gets or sets the fill applied to the table background.

    Namespace: DevExpress.Docs.Presentation

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

    Declaration

    public Fill Fill { get; set; }

    Property Value

    Type Description
    Fill

    A fill applied to the table background.

    Remarks

    You can apply the following fill types to a table:

    The following code snippet specifies the table fill:

    DevExpress Presentation API - Table fill

    using DevExpress.Docs;
    using DevExpress.Docs.Presentation;
    using System.Drawing;
    
    namespace PresentationApiSample;
    
    public class Program {
        public static void Main(string[] _) {
            // Create an in-memory Presentation document
            Presentation presentation = new Presentation(File.ReadAllBytes(@"..\..\..\data\Presentation2.pptx"));
    
            // Add a blank slide to the presentation
            Slide slide = new Slide(SlideLayoutType.Blank);
            presentation.Slides.Add(slide);
    
            // Create a 3x3 table (rows x columns) and add it as a shape to the slide
            Table table = new Table(3, 3);
            table.X = 100;
            table.Y = 100;
            slide.Shapes.Add(table);
    
            for (int row = 0; row < 3; row++) {
                for (int column = 0; column < 3; column++) {
                    table[row, column].TextArea.Text = $"({row}, {column})";
                }
            }
            // Apply a style and fill to the table
            table.Style = new ThemedTableStyle(TableStyleType.NoStyleTableGrid);
            table.Fill = new SolidFill(new OfficeColor(Color.Yellow));
    
        }
    }
    
    See Also