Products Technologies Demo Docs Blog Support Company

Sneak Peek 32.0: Modifying the Normal Stylesheet

Stylesheets in TX Text Control provide a powerful tool for maintaining consistency and ensuring that documents look and feel professional. In version 32.0 it will be possible to manipulate the root style "Normal". This will allow better global formatting changes.

Sneak Peek 32.0: Modifying the Normal Stylesheet

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);

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.

Stay tuned for more features!

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

ASP.NET

Integrate document processing into your applications to create documents such as PDFs and MS Word documents, including client-side document editing, viewing, and electronic signatures.

ASP.NET Core
Angular
Blazor
JavaScript
React
  • Angular
  • Blazor
  • React
  • JavaScript
  • ASP.NET MVC, ASP.NET Core, and WebForms

Learn more Trial token Download trial

Related Posts

ASP.NETWindows FormsWPF

TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version

TX Text Control 33.0 Service Pack 3 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…


ASP.NETWindows FormsWPF

TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version

TX Text Control 33.0 Service Pack 2 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…


ActiveXASP.NETWindows Forms

Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5

TX Text Control 33.0 Service Pack 1 and TX Text Control 32.0 Service Pack 5 have been released, providing important updates and bug fixes across platforms. These service packs improve the…


ASP.NETWindows FormsWPF

The Wait is Over: TX Text Control for Linux is Officially Here

We are very excited to announce the release of TX Text Control 33.0 which includes the long awaited Linux version of TX Text Control. This version allows you to integrate TX Text Control into your…


ASP.NETWindows FormsWPF

Full .NET 9 Support in Text Control .NET Components for ASP.NET Core,…

.NET 9 will be launched tomorrow, November 12, at the .NET Conf 2024 with updates to cloud capabilities, security, and performance. TX Text Control .NET components are fully compatible with .NET 9…