Editor for WinForms | ComponentOne
C1.Win.C1Editor.4.5.2 Assembly / C1.Win.C1Editor Namespace / C1TextRange Class / ApplyClass Method / ApplyClass(String,C1StyleType) Method
The name of a CSS class to apply to the current text range.
Defines type of content to which the inline style must be applied.
Example

In This Topic
    ApplyClass(String,C1StyleType) Method
    In This Topic
    Applies specified CSS class to the text range.
    Syntax
    'Declaration
     
    Public Overloads Sub ApplyClass( _
       ByVal className As System.String, _
       ByVal type As C1StyleType _
    ) 
    public void ApplyClass( 
       System.string className,
       C1StyleType type
    )

    Parameters

    className
    The name of a CSS class to apply to the current text range.
    type
    Defines type of content to which the inline style must be applied.
    Example
    This code applies a "main_topic" class to the paragraph.
    range.ApplyClass("main_topic", C1StyleType.Paragraph);
    See Also