TX Text Control .NET for WPF

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

Topic

Barcodes became part of the document in TX Text Control 19.0, next to images and text frames, and the WPF TextControl received built-in context menus. The version also gave headers and footers separate content for even and odd pages, restarted page numbers per section, and let MailMerge fill barcodes and charts with data.

Version 19.0 was released in April 2013 as TX Text Control X9, together with the new TX Barcode .NET 2.0, as the blog article TX Text Control X9 and TX Barcode .NET Have Been Released announced. The WPF control was sold as TX Text Control .NET for WPF and, together with the server components, as TX Text Control Server for ASP.NET (incl. WPF).

Version 19.0 at a Glance

AreaWhat is new
Headers and footersDifferent headers and footers for even and odd pages, a dividing line with a label
BarcodesBarcode frames in the text, positioned like images, with a layout dialog box and events
User interfaceBuilt-in context menus, permanent control characters, the anchor symbol, selection events for images and text frames
Page numberingRestarted numbering per section, the total number of pages, a page number dialog box
MS Word content controlsImported from DOCX as application fields
Mail mergeMerging into barcodes and charts, canceling a merge, new events

Headers and Footers

A document, or a single section, can have different headers and footers for even and odd pages. The methods Add, GetItem and Remove of HeaderFooterCollection accept the HeaderFooterType values EvenHeader and EvenFooter. When an even header or footer exists, a header or footer of the type Header or Footer is the one of the odd pages; otherwise, it is used on all pages. The section format dialog box offers the choice to users.

An activated header or footer is separated from the main text by a dividing line instead of a frame, with a label that says which header or footer (even, odd or first page) is active. The new HeaderFooterFrameStyle value DividingLine sets this style, and the former styles remain available. WPF.TextControlColors.HeaderFooterLineColor and HeaderFooterLabelColor set the colors of the line and the label. See Sections, Pages, Headers, and Footers.

Barcodes

Barcode controls of the type TXTextControl.Barcode.TXBarcodeControl can be inserted into a document:

Charts and Barcodes shows how barcodes are used in the current version.

Page Numbering

User Interface

  • Built-in context menus. A right click opens a context menu with the standard commands for the place that was clicked: text formatting, inserting and editing headers and footers together with the page settings, or images and text frames.
  • Change a context menu. Before a built-in menu opens, the TextContextMenuOpening event occurs. Its WPF.TextContextMenuEventArgs give the ContextMenuLocation in the document, and through TextContextMenu a handler changes or extends the menu, replaces it with its own or suppresses it. See Context Menus.
  • Anchor symbol. A control character left of the first character of a paragraph shows where a selected object is anchored.
  • Permanent control characters. PermanentControlChars shows single control characters all the time, whatever the value of ControlChars.
  • Selection events. ImageSelected, ImageDeselected, TextFrameSelected and TextFrameDeselected occur when an image or a text frame is selected or deselected.
  • Tables. A new overload of TableCollection.Add opens a dialog box in which users specify the new table.

MS Word Content Controls

When a DOCX document is loaded, its MS Word content controls are converted to fields of the type ApplicationField. Version 21.0 added adapter classes for them; Fields and Subtext Parts describes fields and their adapters today.

Mail Merge

Upgrade to Version 19.0

  • HeaderFooterType. The methods of HeaderFooterCollection accept the new values EvenHeader and EvenFooter. Code that handles all values of HeaderFooterType has to handle these as well.
  • HeaderFooterFrameStyle. The property HeaderFooterFrameStyle has the new value DividingLine.

New Classes, Properties, Methods and Events

The classes and members below are the ones that the What's New documentation of version 19.0 lists for TX Text Control .NET for WPF. Names are relative to the TXTextControl namespace, each name links to its current reference page, and "(obsolete)" marks a member that is obsolete today. The version's own list also names the event ShapeDeleted of WPF.Drawing.TXDrawingControl, a class that the reference dates to version 23.0, and the reference dates the event ShapeDeleted of Drawing.TXDrawingCore to 19.0, although the class came with version 33.0; both are left out here. The list also names PageNumberField as a new class, but PageNumberFieldCollection already took PageNumberField objects in version 13.0, so it isn't listed under New Classes.

New Classes

Members by Class

ClassPropertiesMethodsEvents
DataVisualization.BarcodeCollectionAdd, CopyTo, GetItem, Remove
DataVisualization.BarcodeEventArgsBarcodeFrame
DataVisualization.BarcodeFrameBarcode, ExportCompressionQuality, ExportFileName, ExportFilterIndex, ExportResolution, SaveModeAddUndoUnit, Refresh
DocumentServer.MailMergeGetBlockFieldNamesBarcodeMerged, ChartMerged
DocumentServer.MailMerge.BarcodeMergedEventArgsBarcodeFrame
DocumentServer.MailMerge.ChartMergedEventArgsChartFrame
DocumentServer.MailMerge.DataRowMergedEventArgsCancel
DocumentServer.MailMerge.IncludeTextMergingEventArgsIncludeTextField
PageNumberFieldNumberFormat, ShowNumberOfPages, StartNumberPageNumberDialog
SectionFormatRestartPageNumbering
ServerTextControlBarcodesOnBarcodeCreated, OnBarcodeDeletedBarcodeCreated, BarcodeDeleted
WPF.TextContextMenuEventArgsContextMenuLocation, HorizontalOffset, TextContextMenu, VerticalOffset
WPF.TextControlBarcodes, PermanentControlCharsBarcodeLayoutDialog, OnBarcodeClicked, OnBarcodeCreated, OnBarcodeDeleted, OnBarcodeDeselected, OnBarcodeDoubleClicked, OnBarcodeMoved, OnBarcodeRightClicked, OnBarcodeSelected, OnBarcodeSized, OnImageDeselected, OnImageSelected, OnTextContextMenuOpening, OnTextFrameDeselected, OnTextFrameSelectedBarcodeClicked, BarcodeCreated, BarcodeDeleted, BarcodeDeselected, BarcodeDoubleClicked, BarcodeMoved, BarcodeRightClicked, BarcodeSelected, BarcodeSized, ImageDeselected, ImageSelected, TextContextMenuOpening, TextFrameDeselected, TextFrameSelected
WPF.TextControlColorsHeaderFooterLabelColor, HeaderFooterLineColor

Next Steps