[]
        
(Showing Draft Content)

C1.Win.C1Editor.C1TextRange.IsStyleApplied

IsStyleApplied Method

IsStyleApplied(string)

Returns a value indicating whether the inline style is applied to all text within the C1TextRange.

Declaration
public bool IsStyleApplied(string propertyName)
Parameters
Type Name Description
string propertyName

The CSS property name.

Returns
Type Description
bool

True, if the CSS class is applied to the range; otherwise, False.

Examples

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;
}