TX Text Control .NET for WPF

What's New in TX Text Control .NET for WPF 26.0

Topic

Track changes, formulas in table cells and the import of Excel workbooks came to TX Text Control .NET for WPF with version 26.0, together with the Sidebar control, which shows panels beside the document instead of dialog boxes. Mail merge gained filters, sorting and conditions for merge blocks, with a dialog box to define them.

Version 26.0 was released on November 14, 2018, as TX Text Control X16, together with TX Text Control .NET Server, TX Text Control .NET for Windows Forms, TX Text Control ActiveX and TX Barcode .NET 5.0. Its last full installer, that of Service Pack 1, is dated May 31, 2019. The features below are the ones added since version 25.0.

Version 26.0 at a Glance

AreaWhat is new
Track changesInserted and deleted text marked per user, accepted or rejected in code or on the Proofing tab
SidebarA control that shows find, replace, styles and tracked changes panels docked or as a dialog
File formatsImport of Excel workbooks (XLSX) with StreamType.SpreadsheetML
TablesFormulas with A1 or R1C1 references, number formats, cell references in the ruler bars, new keyboard behavior
Mail mergeRemoval of empty lines, conditions, filters and sorting instructions for merge blocks, a filter and sort dialog box

Track Changes

With track changes switched on, TX Text Control marks every text change with the user who made it. See Track Changes and, for code without a visible control, Comments and Tracked Changes.

  • Switching it on. TextControl.IsTrackChangesEnabled turns the tracking of new changes on or off. Changes that were already tracked stay marked until they are removed.
  • The tracked changes. TextControl.TrackedChanges returns the TrackedChangeCollection of the main text; headers, footers and text frames have their own. Each TrackedChange has a start position, a length, a ChangeKind for inserted or deleted text, a ChangeTime and a UserName.
  • Users. A new change belongs to the current user, the first name in TextControl.UserNames. An empty list means an unknown user.
  • Accepting and rejecting. The only way to remove a tracked change is to accept or reject it with TrackedChangeCollection.Remove.
  • Highlighting. Changes are highlighted in a color per user, red for the current user by default. Inserted text is shown in the color, deleted text in the color and struck through.
  • Events. TextControl raises TrackedChangeCreated, TrackedChangeDeleted and TrackedChangeChanged, and TrackedChangeStateChanged when a change becomes active or inactive. Some complex operations, such as deleting a table column, can't be tracked; TextControl then raises CannotTrackChange, and the user decides whether the change is made.
  • Ribbon. The RibbonProofingTab received a Track Changes group whose buttons switch tracking on and off, accept and reject changes and move to the next or previous change.
  • File formats. Tracked changes are saved and loaded with the TX Text Control format, RTF, DOC and DOCX.

The Sidebar Control

The new Sidebar is a control that an application places in its window as an alternative to dialog boxes. See Sidebar and Panels.

  • Docked or floating. IsPinned shows the sidebar inside the window or as a dialog, and users can pin and unpin it.
  • Content. A sidebar shows content of your own or one of several predefined layouts, which are connected to a TextControl.
  • Ribbon buttons. A ribbon tab can open a vertical and a horizontal sidebar with a toggle button. The RibbonFormattingTab names its sidebars for find, go to, replace and styles, and the RibbonProofingTab the one for tracked changes.

Excel Workbooks

TX Text Control loads files and memory blocks in SpreadsheetML, the spreadsheet part of Office Open XML and the default format of MS Excel (XLSX). The StreamType enumeration received the value SpreadsheetML.

Supported File Formats lists the formats of today's version.

Formulas and Number Formats in Tables

A table cell can calculate its content from other cells with a formula, which is loaded from a SpreadsheetML document or set in code.

Calculate With Formulas explains formulas, cell references and number formats as they work today, and Formula Functions lists the functions.

Keyboard Behavior in Tables

Two keys work differently in tables since version 26.0:

  • The TAB key in the last cell of a table adds a new row at the end of the table.
  • The ENTER key at the first input position of a document that starts with a table inserts an empty line before the table.

Mail Merge

MailMerge creates documents from a template and data. Version 26.0 gave it more control over empty lines and over merge blocks, the sections of a template that are repeated for each record.

See Conditional Content, Sorting and Filtering and Reporting Ribbon and WPF Dialog Boxes.

Other API Additions

  • Loading. LoadSettings received properties such as LoadImages, LoadHypertextLinks, ImageSearchPath, PageSize and PageMargins, which appear in the What's New list below.
  • Saving. SaveSettings.OmittedContent specifies data that is left out when a document is saved.
  • Subtext parts. SubTextPart.Data stores additional data with a subtext part as a string.
  • Main text. TextControl.MainTextActivated occurs when the input position moves into the main text from a header, a footer or a text frame.

Upgrade to Version 26.0

  • No update notes. No update notes were published for version 26.0.
  • Breaking changes. No change of version 26.0 is known to break existing code. Breaking Changes starts with version 30.0.

New Classes, Properties, Methods and Events

These are the classes and members that the What's New documentation of version 26.0 lists for TX Text Control .NET for WPF. Names are relative to the TXTextControl namespace. Each name links to its current reference page.

New Classes

.NET Members by Class

ClassPropertiesMethodsEvents
CannotTrackChangeEventArgsCancel, DefaultMessage, Handled
DocumentServer.DataShaping.FilterInstructionColumnName, CompareTo, ComparisonOperator, LogicalOperator
DocumentServer.DataShaping.SortingInstructionOrderBy, SortOrder
DocumentServer.DataSources.MergeBlockInfoBlockMergingCondition, Filters, SortingInstructions
DocumentServer.DataSources.MergeBlockSettingsCreatedTable, TableID
DocumentServer.MailMergeRemoveEmptyLines
DocumentServer.WPF.FilterAndSortDialogFilters, SortingInstructionsStoreBlockMetaData
DocumentServer.WPF.InsertMergeBlockDialogCreatedTable
FormulaExceptionCharacterIndex
HeaderFooterTrackedChanges
IFormattedTextTrackedChanges
InputFormatNumberFormat, NumberTextType, StandardTextType
LoadSettingsAddParagraph, BytesRead, CssFileName, DocumentPartName, DocumentTitle, ImageSearchPath, LoadedFile, LoadedStreamType, LoadHypertextLinks, LoadImages, PageMargins, PageSizeGetDocumentPartNames
NumberFormatExceptionCharacterIndex
SaveSettingsOmittedContent
ServerTextControlFormulaReferenceStyle, IsFormulaCalculationEnabled, TrackedChangesOnTrackedChangeCreated, OnTrackedChangeDeletedTrackedChangeCreated, TrackedChangeDeleted
SubTextPartData
TableCellCellFormat, Column, Formula, Length, Position, Row, Start, Text, Width
TableCellFormatNumberFormat, TextType
TableCollectionCanAdd, GridLines, SupportedFormulaFunctions, SupportedNumberFormatsAdd, GetItem, Remove
TextFrameTrackedChanges
TrackedChangeActive, ChangeKind, ChangeTime, DefaultHighlightColor, HighlightColor, HighlightMode, Length, Number, Start, Text, UserNameSave, ScrollTo, Select
TrackedChangeCollectionCount, IsSynchronized, Item, SyncRootCopyTo, GetEnumerator, GetItem, Remove
TrackedChangeEventArgsTrackedChange
WPF.RibbonFormattingTabFindHorizontalSidebar, FindSidebar, GotoHorizontalSidebar, GotoSidebar, ReplaceHorizontalSidebar, ReplaceSidebar, StylesSidebar
WPF.RibbonProofingTabTrackedChangesHorizontalSidebar, TrackedChangesSidebar
WPF.RulerBarFormulaMode
WPF.SidebarContent, ContentLayout, DialogLocation, DialogSize, DialogStyle, IsPinned, IsShown, IsSizable, ShowCloseButton, ShowPinButton, ShowTitle, Text, TextControl, TitleFontFamily, TitleFontSize, TitleForeground
WPF.TextControlFormulaReferenceStyle, IsFormulaCalculationEnabled, IsTrackChangesEnabled, RibbonFormulaTab, TrackedChangesOnCannotTrackChange, OnMainTextActivated, OnTrackedChangeChanged, OnTrackedChangeCreated, OnTrackedChangeDeleted, OnTrackedChangeStateChangedCannotTrackChange, MainTextActivated, TrackedChangeChanged, TrackedChangeCreated, TrackedChangeDeleted, TrackedChangeStateChanged

Next Steps