VegaRise.NET
Back to DOM

BaseTextStyleClass

Definition

Namespace
DOM.Abstracts
Assembly
DOM.dll

Base class for text-run styles.

Remarks

is a typed marker that sits between and the concrete text-style classes (,, etc.). It exists so that text styles can be stored and treated uniformly while remaining distinguishable from other style categories at compile time. BaseTextStyle BaseStyle TextStyle FontPart

Examples

csharp
1// 1. Store text styles in a typed list
2var textStyles = new List<BaseTextStyle>
3{
4 new TextStyle { ReferenceStyleId = "Body" },
5 new FontPart("Calibri", 12.0)
6};
7
csharp
1// 2. Cast a concrete text style
2BaseTextStyle style = new TextStyle();
3
csharp
1// 3. Type-check during rendering
2if (element is BaseTextStyle ts) { /* apply character style */ }
3
csharp
1// 4. Access the inherited reference style id
2var refId = style.ReferenceStyleId;
3
No members discovered for this type.
VegaRise.NET

Sign In

Welcome back. Please sign in to your account.

Forgot password?
or

Don't have an account? Create an account

By signing in, you agree to our Terms of Service and Privacy Policy.