officefileapi-devexpress-dot-docs-dot-presentation-dot-table-ac2baea5.md
Gets or sets the effects applied to the table.
Namespace : DevExpress.Docs.Presentation
Assembly : DevExpress.Docs.Presentation.v25.2.dll
NuGet Package : DevExpress.Docs.Presentation
public TableEffectProperties Effects { get; set; }
Public Property Effects As TableEffectProperties
| Type | Description |
|---|---|
| TableEffectProperties |
Contains the effects applied to the table.
|
The following code snippets adds an outer shadow effect to a table:
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;
table.Width = 2500;
table.Height = 2000;
slide.Shapes.Add(table);
// Populate table cells with text
for (int row = 0; row < 3; row++) {
for (int column = 0; column < 3; column++) {
table[row, column].TextArea.Text = $"({row}, {column})";
}
}
// Apply an outer shadow effect to the table
TableEffectProperties effectProperties = new TableEffectProperties();
effectProperties.OuterShadow = new OuterShadowEffect { Angle = -45, Color = new OfficeColor(Color.Gray), BlurRadius = 100, Distance = 10 };
table.Effects = effectProperties;
}
}
Imports DevExpress.Docs
Imports DevExpress.Docs.Presentation
Imports System.Drawing
Namespace PresentationApiSample
Public Class Program
Public Shared Sub Main(args As String())
' Create an in-memory Presentation document
Dim presentation As New Presentation(File.ReadAllBytes("..\..\..\data\Presentation2.pptx"))
' Add a blank slide to the presentation
Dim slide As New Slide(SlideLayoutType.Blank)
presentation.Slides.Add(slide)
' Create a 3x3 table (rows x columns) and add it as a shape to the slide
Dim table As New Table(3, 3)
table.X = 100
table.Y = 100
table.Width = 2500
table.Height = 2000
slide.Shapes.Add(table)
' Populate table cells with text
For row As Integer = 0 To 2
For column As Integer = 0 To 2
table(row, column).TextArea.Text = $"({row}, {column})"
Next
Next
' Apply an outer shadow effect to the table
Dim effectProperties As New TableEffectProperties()
effectProperties.OuterShadow = New OuterShadowEffect With {
.Angle = -45,
.Color = New OfficeColor(Color.Gray),
.BlurRadius = 100,
.Distance = 10
}
table.Effects = effectProperties
End Sub
End Class
End Namespace
See Also