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