RichTextKit v0.4

Style Class

Assembly: Topten.RichTextKit.dll
Namespace: Topten.RichTextKit

A basic implementation of IStyle interface provides styling information for a run of text.

public class Style :
    IStyle

Inheritance

Style → object

Interfaces

IStyle

Constructors

Style()

Properties

BackgroundColor

The background color of this run (no background is painted by default).

FontFamily

The font family for text this text run (defaults to "Arial").

FontItalic

True if the text in this run should be displayed in an italic font; otherwise False (defaults to false).

FontSize

The font size for text in this run (defaults to 16).

FontVariant

The font variant (ie: super/sub-script) for text in this run.

FontWeight

The font weight for text in this run (defaults to 400).

FontWidth

The font width for text in this run (defaults to WidthStyle.Normal).

HaloBlur

Blur of halo

HaloColor

Color of the halo

HaloWidth

Width of halo

LetterSpacing

The character spacing for text in this run (defaults to 0).

LineHeight

The line height for text in this run as a multiplier (defaults to 1.0).

ReplacementCharacter

Specifies a replacement character to be displayed (password mode)

StrikeThrough

The strike through style for the text in this run (defaults to None).

TextColor

The text color for text in this run (defaults to black).

TextDirection

Text direction override for this span

Underline

The underline style for text in this run (defaults to None).

Methods

Modify(string, Nullable<float>, Nullable<int>, Nullable<SkiaSharp.SKFontStyleWidth>, Nullable<bool>, Nullable<UnderlineStyle>, Nullable<StrikeThroughStyle>, Nullable<float>, Nullable<SkiaSharp.SKColor>, Nullable<SkiaSharp.SKColor>, Nullable<SkiaSharp.SKColor>, Nullable<float>, Nullable<float>, Nullable<float>, Nullable<FontVariant>, Nullable<TextDirection>, Nullable<char>)

Modifies this style with one or more attribute changes and returns a new style

Seal()

Seals the style to prevent it from further modification

Extension Methods

HasSameLayout(this IStyle, IStyle)

Compares this style to another and returns true if both will have the same layout, but not necessarily the same appearance (eg: color change, underline etc...)

IsSame(this IStyle, IStyle)

Compares this style to another and returns true if both will have the same layout, but not necessarily the same appearance (eg: color change, underline etc...)

Key(this IStyle)

Generates a string key that uniquely identifies the formatting characteristics of this style.