Rich Text Editor / Document Model / Styles / Inline Styles
In This Topic
    Inline Styles
    In This Topic

    Inline styles are rich text styles that can be applied to inline elements. The InlineRule property of the inline style exposes the properties you can use to style an inline like FontName, FontSize, FontStyle, Fill, BackgroundFill, etc. The code below shows how to create an inline style and apply it to a text inline:

    Inline Style Example
    Copy Code
    NInlineStyle style = new NInlineStyle("Style1");
    style.Rule = new NInlineRule(NColor.Red);
    style.Rule.FontStyle = ENFontStyle.Bold;
    style.Apply(inline);
    

    As a result the text of the styled inline will become red and bold.

    See Also