GUIDED API LAB
Loading lesson...
The coding workspace is preparing the first stylesheet exercise.
Execution profile
Paragraph selections—
Styles created—
Style assignments—
Definition updates—
Apply calls—
Ready to tryUse the controls above to interact with this demo.
Server-side document API
Store formatting as document structure
A ParagraphStyle is a named, reusable definition embedded in the document. Applying a style preserves semantic intent and makes global visual changes possible without selecting every occurrence.
Style collection
ServerTextControl.ParagraphStyles
Create a definition
new ParagraphStyle(name, baseStyle)
Apply by name
ServerTextControl.Selection.FormattingStyle
Refresh occurrences
FormattingStyle.Apply
How the lab executes code
Each lesson starts from a fresh document containing five prepared paragraph styles. The submitted source is parsed against an allowlist for style declarations, properties, collection access, selection, assignment, and Apply; arbitrary CLR source is never compiled.
Styles can combine character and paragraph formatting, inherit from another named definition, and specify a following style. The result remains Word-compatible and is rendered as SVG through Page.GetImage.
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4