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