SetShd
Specifies the shading which shall be applied to the extents of the current table cell.
Parameters:
Name |
Type |
Description |
sType |
ShdType | ApiFill
|
The shading type applied to the contents of the current table. Can be ShdType or ApiFill. |
r |
byte
|
Red color component value. |
g |
byte
|
Green color component value. |
b |
byte
|
Blue color component value. |
Returns:
-
This method doesn't return any data.
Example
Copy code
builder.CreateFile("pptx");
var oPresentation = Api.GetPresentation();
var oTable = Api.CreateTable(2, 4);
var oRow = oTable.GetRow(0);
var oCell = oRow.GetCell(0);
var oFill = Api.CreateSolidFill(Api.CreateRGBColor(51, 51, 51));
oCell.SetShd(oFill);
var oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
oSlide.AddObject(oTable);
builder.SaveFile("pptx", "SetShd.pptx");
builder.CloseFile();
Resulting document