Editor for WinForms | ComponentOne
C1.Win.C1Editor.4.5.2 Assembly / C1.Win.C1Editor Namespace / C1TextRange Class / IsTagApplied Method
The tag name.
Example

In This Topic
    IsTagApplied Method
    In This Topic
    Returns a value indicating whether the specified tag is applied to the C1TextRange.
    Syntax
    'Declaration
     
    Public Function IsTagApplied( _
       ByVal tagName As System.String _
    ) As System.Boolean
    public System.bool IsTagApplied( 
       System.string tagName
    )

    Parameters

    tagName
    The tag name.

    Return Value

    True, if the specified tag is applied to the current range; otherwise, False.
    Example
    The code updates an application UI. It marks an "Ordered list" button as checked if an ordered list is selected. It marks an "Unordered list" button as checked if an unordered list is selected.
    btnOrderedList.Checked = _editor.Selection.IsTagApplied("ol");
    btnUnorderedList.Checked = _editor.Selection.IsTagApplied("ul");
    See Also