New Features

TX Text Control 26.0 provides the following new features:

Tracked Changes

To see who has been making text changes to a document a TextControl offers the track changes feature. It can be turned on or off with the new TextControl.IsTrackChangesEnabled or WPF.TextControl.IsTrackChangesEnabled properties. When the feature is turned on, a TextControl marks up new text changes made to the document. When it is turned off, marking up new changes are stopped. Any changes that were already tracked remain marked up in the document until they are removed. All tracked changes in a document are available through a TrackedChangeCollection which can be obtained through the new TextControl.TrackedChanges or WPF.TextControl.TrackedChanges properties. Every TrackedChange in the collection has a Start and a Length. The ChangeKind property determines the kind of change, deleted or inserted text. The only way to remove tracked changes in a document is to accept or to reject them with the TrackedChangeCollection.Remove method. Each tracked change has a change time and is related to a user. When a new change is tracked, the current user is associated with the change. The current user is the first in the list of users set with the TextControl.UserNames property. When the list of users is empty, the subtextpart's name is set to an empty string which is interpreted as an unknown user. Events occur, when a tracked change is created (TrackedChangeCreated), deleted (TrackedChangeDeleted) or changed (TrackedChangeChanged). A tracked change is highlighted on the screen with a color depending on the user, the default color for the current user is red. Newly inserted text is highlighted through colored text, deleted text is highlighted through colored and strikethrough text. Some complex text operations, for example deleting a table column cannot be tracked. In these cases a CannotTrackChange event occur and the end-user can decide whether the change is made. Tracked changes are saved and can be reloaded with the TextControl text format (.tx), the Rich Text Format (.rtf) and the Microsoft Word formats (.doc, .docx).

Ribbon Tabs

The Windows.Forms.Ribbon.RibbonProofingTab and the WPF.RibbonProofingTab have been extended with the new Track Changes ribbon group, containing buttons to turn on and off tracking changes, to accept and reject tracked changes and to scroll to the next or to the previous tracked change. The Windows.Forms.Ribbon.RibbonTableLayoutTab and the WPF.RibbonTableLayoutTab have been extended to support formulas and number formats in table cells.

SpreadsheetML Format

In addition to WordprocessingML TX Text Control supports the SpreadsheetML part of the Microsoft Office Open XML format. This format is a ZIP compressed XML format for spreadsheet processing and is used as standard format of Microsoft Excel. Text Control can load .xlsx files and blocks of memory containing documents formatted with this format. The StreamType enumeration has been extended with the new SpreadsheetML member. The import of this file type is limited to the contents of the first worksheet in the document. Formulas containing cell references into other worksheets or files are not supported.

Formulas in Tables

TX Text Control supports calculations in a table by using formulas. A formula is a property of a table cell and can be either loaded with a SpreadsheetML document or can be inserted using the TableCell.Formula and TableCellFormat.NumberFormat properties. Formulas can reference other table cells and the text content of a formula cell is automatically updated when the content of an input cell changes. Automatic updating can be switched off with the IsFormulaCalculationEnabled property. Cell references can be specified either with the A1 or with the R1C1 notation. The A1 notation specifies a table cell with a column letter and a row number, for example B3 refers to the table cell in the third row and the second column. The R1C1 notation addresses a table cell with a row number and a column number, for example R3C2 refers to the same table cell in the third row and the second column. Relative addresses can be expressed with square brackets, for example R[-3]C[-2]. The numbers inside the square brackets show how many rows or columns the cell is relative to itself. Negative row numbers mean that the referenced cell is above the cell containing the formula. Negative column numbers mean that the referenced cell is to the left of the cell containing the formula. To switch the reference style the FormulaReferenceStyle property can be used. The TableFormatDialog has been extended with a third tab which can also be used to specify a formula and a number format for one or more table cells. For more information about formulas see Using Formulas in Table Cells and for more information how to format the formula result see Formatting Text by using Number Formats. A formula cell can be the input cell of a further formula cell. Cell references pointing to other tables or document files are not supported. Number formats are restricted to positive number formats. The Supported Formula Functions section lists all supported functions that can be used in formulas.

Ruler Bars

The new RulerBar.FormulaMode and WPF.RulerBar.FormulaMode properties support formulas in tables through showing cell references. Depending on the TextControl.FormulaReferenceStyle property table cells are addressed either with the A1 or with the R1C1 notation. Depending on the mode cell references are shown for all cells or only for cells which contain a formula.

Windows Forms Ribbons

In Windows Forms key tips are now available for all ribbon drop down controls including the application menu. The new Windows.Forms.Ribbon.RibbonForm.HasQuickAccessToolbar property defines whether a quick access toolbar is shown in the caption area of the form and the new Windows.Forms.Ribbon.Ribbon.HasApplicationMenu property defines whether the first tab of the ribbon is an application menu.

Keyboard Interface

Pressing the TAB key in the last cell of a table inserts now a new table row at the end of the table. Pressing the ENTER key at the first input position of a document when the document begins with a table inserts now an emty line in front of the table.

Mail Merge

The MailMerge class has the new property RemoveEmptyLines which determines if text lines which are empty after merging data into a document are removed from the document entirely. The class MergeBlockInfo has the new property BlockMergingCondition which determines if a merge block is merged normally or entirely left out. The property defines a condition based on the contents of a column of the parent data row and offers multiple comparison operations (e. g. "greater than", "is not blank", "equal to" etc.). It is now possible to filter and sort merge block data according to user definable rules. For this purpose the class MergeBlockInfo has the new properties Filters and SortingInstructions. Data can be sorted in an ascending and descending order based on multiple columns and filtering rules can be concatenated using logical "and" and "or" operators. The new "Filter and Sort" dialog box (DocumentServer.Windows.Forms.FilterAndSortDialog and DocumentServer.WPF.FilterAndSortDialog) can either be called programmatically to generate merge block data filters and sorting instructions or summoned using the new "Filter and Sort" buttons in the EditMergeBlocksDialog and the InsertMergeBlockDialog dialog boxes. The filters and sorting instructions can be stored in existing merge blocks using the method FilterAndSortDialog.StoreBlockMetaData or added to new merge blocks using the new Filters and SortingInstructions properties of class MergeBlockInfo.