[]
Applies specified inline style to the range.
public void ApplyStyle(string propertyName, string propertyValue)
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of CSS property. |
| string | propertyValue | CSS value. |
This example converts a Color value to a CSS value and sets it as the background color of the selected range.
string htmlColor = ColorTranslator.ToHtml(value);
c1Editor1.Selection.ApplyStyle("background-color", htmlColor);
Applies specified inline style to the range.
public void ApplyStyle(string propertyName, string propertyValue, C1StyleType type)
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of CSS property. |
| string | propertyValue | CSS value. |
| C1StyleType | type | Defines type of content to which inline style must be applied. |