Stylesheet (or styles) are used to apply consistent formatting to various parts of a document. By defining formatting rules, headings, subheadings, and content paragraphs can be formatted consistently to streamline formatting processing and improve the performance of the document creation process.

Unlike the current and older versions of TX Text Control, version 32.0 will allow you to manipulate the [Normal] style. This allows you to change the root style of the document, which is propagated through all inherited styles.

Global Changes

Applying a global change to the root style automatically updates the inherited styles. For example, if a user changes the font name of the [Normal] style, all inherited styles for headings or other elements throughout the document are updated.

The following screenshot shows a document with three styles:

  • [Normal]: Unchanged, the default setting is Arial, 10pt.
  • Heading 1: Based on [Normal] with an increased font size of 16.
  • Heading 2: Based on [Heading 1] with a decreased font size of 12.

Normal Style in TX Text Control

Changing the Root Style

In version 32.0 it will be possible to change the [Normal] style by setting the Font property at design time or runtime.

textControl1.Font = new Font("Times New Roman", 12, FontStyle.Regular);
view raw test.cs hosted with ❤ by GitHub

Any styles that are inherited will be automatically updated in the style chain.

Normal Style in TX Text Control

Persistency

When saving documents, the default [Normal] stylesheet is persistent, so you can use this feature to create a default template (similar to Normal.dot(m) in MS Word) that can be loaded with a default style. Alternatively, the default style can be set at design time before the control is created.

The same behavior will be compatible with the non-UI class ServerTextControl TX Text Control .NET Server for ASP.NET
TXTextControl Namespace
ServerTextControl Class
The ServerTextControl class implements a component that provide high-level text processing features for server-based applications.
.

Stay tuned for more features!