SetBorderColor
Sets the border color to the current content control.
Syntax
expression.SetBorderColor(color);
expression - A variable that represents a ApiBlockLvlSdt class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| color | Optional | ApiColor | The border color. |
Returns
boolean
Example
Set a border color on a content control in a document.
// How do I change the border color of a content control in a document?
// Give a content control a colored outline to visually distinguish it from other content in a document.
let doc = Api.GetDocument();
let blockLvlSdt = Api.CreateBlockLvlSdt();
blockLvlSdt.SetBorderColor(Api.HexColor('#0000FF'));
blockLvlSdt.GetContent().GetElement(0).AddText("This is a block text content control with blue border.");
doc.AddElement(0, blockLvlSdt);