Sets the background color to the current block content control.
Name | Type | Description |
r | byte | Red color component value. |
g | byte | Green color component value. |
b | byte | Blue color component value. |
bNone | boolean | Defines that background color will not be set. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oBlockLvlSdt = Api.CreateBlockLvlSdt(); oBlockLvlSdt.GetContent().GetElement(0).AddText("This is a block text content control."); oBlockLvlSdt.SetBackgroundColor(255, 111, 61); oDocument.AddElement(0, oBlockLvlSdt); builder.SaveFile("docx", "SetBackgroundColor.docx"); builder.CloseFile();