Products Technologies Demo Docs Blog Support Company

TX Text Control 16.0: New TextPartCollection

TX Text Control 16.0 adds the TextPartCollection, a meta collection that iterates text parts across headers, footers, text frames, and the main body in a single loop. Using IFormattedText, developers access ApplicationFields in every document area without writing separate iterations.

TX Text Control 16.0: New TextPartCollection

TX Text Control .NET for WPF 16.0 and TX Text Control .NET for Windows Forms 16.0 come with a new collection: TextPartCollection. It is a kind of meta collection that allows the iteration of text parts such as tables or text fields in all document parts (main text, headers, footers or text frames). This is useful to access all available collections via one standard interface. The following diagram shows the TextParts in detail:

Consider the following application: A document template consists of ApplicationFields in the main text, in headers and footers and in several text frames. And you want to replace the text in all of these fields. With previous versions, you had to iterate through all sections, it's contained headers and footers and throught all text frames separately. Now, just one loop is required to get access to all ApplicationFields:

foreach (object obj in textControl1.TextParts)
{
    foreach (ApplicationField field in ((IFormattedText)obj).ApplicationFields)
    {
        field.Text = "New text";
    }
}

It's that easy. The IFormattedText interface contains properties and methods common to all text parts in a TX Text Control document like in this case the ApplicationFieldCollection. Test it on your own and download a trial version today:

TX Text Control Trial Versions

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

ASP.NET CoreDS ServerRelease

Announcing TX Text Control DS Server 5.0

We are excited to announce the release of TX Text Control DS Server 5.0. This release focuses on extensibility, plugin integration, and developer productivity while continuing to improve the…


ASP.NETWindows FormsWPF

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

TX Text Control 34.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…


ASP.NETWindows FormsWPF

TX Text Control 34.0 SP1 is Now Available: What's New in the Latest Version

TX Text Control 34.0 Service Pack 1 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

Introducing TX Text Control 34.0: Your Next Leap in Document Processing

We are happy to announce the release of TX Text Control 34.0. This version is packed with new features and enhancements that will elevate your document processing experience. This version…


ASP.NETASP.NET CorePDF/UA

PDF/UA vs. PDF/A-3a: Which Format Should You Use for Your Business Application?

In this blog post, we will explore the differences between PDF/UA and PDF/A-3a, helping you choose the right format for your business needs. We will discuss the key features, benefits, and use…

Share on this blog post on: