[]
Returns a value indicating whether the inline style is applied to all text within the C1TextRange.
public bool IsStyleApplied(string propertyName)
Type | Name | Description |
---|---|---|
string | propertyName | The CSS property name. |
Type | Description |
---|---|
bool | True, if the CSS class is applied to the range; otherwise, False. |
The example demonstrates a function which determines whether or not selected text is underlined.
function IsUnderline()
{
if (_editor.Mode == EditorMode.Design)
{
bool res = false;
if (_editor.Selection.IsStyleApplied("text-decoration"))
res = string.Compare(_editor.Selection.GetStyleValue("text-decoration", C1StyleType.Character), "underline", true) == 0;
return res;
}
else
return false;
}