TX Text Control .NET for Windows Forms

What's New in TX Text Control .NET for Windows Forms 23.0

Topic

Drawings made of MS Word shapes, which users edit directly in the document, and a set of new dialog boxes for hyperlinks, bookmarks, symbols and navigation are the Windows Forms additions of version 23.0. The same version introduced subtext parts, saved document properties such as the author with every format and changed how merge blocks are stored in mail merge templates.

Version 23.0 was released on December 9, 2015, as TX Text Control X13, together with TX Text Control .NET Server, TX Text Control .NET for WPF and TX Text Control ActiveX. Its last full installer, that of Service Pack 1, is dated August 8, 2016. The features below are the ones added since version 22.0.

Version 23.0 at a Glance

AreaWhat is new
DrawingsDrawings and preset shapes compatible with MS Word, the TXDrawingControl, a layout dialog box
Dialog boxesHyperlinks, bookmarks, deleting bookmarks, go to, symbols, an extended list format dialog box
Formatted textSubtext parts, collections for all text parts, symbol characters, Unicode bullets
EditingUser-defined undo steps, frames drawn with the mouse
DocumentsAuthor, dates, keywords and subject saved with every format
Mail mergeMerge blocks as subtext parts, MergeObject, the BlockMerging event

Drawings and Shapes

TX Text Control supports drawings and the preset shapes of ISO/IEC 29500-1, section 20.1.10.55. A drawing is a single shape or a canvas with several shapes. See Text Frames and Shapes.

  • Positioning. A DrawingFrame positions the drawing like an image or a text frame: as a single character, anchored to a paragraph or at a fixed position in the document.
  • The drawing control. Each drawing frame has a Drawing.TXDrawingControl, returned by DrawingFrame.Drawing, which holds the appearance and the data of the drawing. Its shapes are in a Drawing.ShapeCollection.
  • Editing. Users activate a drawing and change its shapes with built-in mouse and keyboard interfaces. The Drawing.ShapesContextMenuStrip class is the context menu of the shapes.
  • The collection. TextControl.Drawings returns the DrawingCollection, which adds and removes drawings. DrawingCreated, DrawingDeleted and further events of the TextControl report what happens to a drawing.
  • Layout dialog box. TextControl.DrawingLayoutDialog opens a dialog box for the position, the size and the distances to the text.
  • File formats. Drawings are saved and loaded with the TX Text Control format and DOCX. Other formats save the drawing's image.

New Dialog Boxes

Version 23.0 added built-in Windows Forms dialog boxes for links, bookmarks and navigation. See Built-in Dialog Boxes.

  • Hyperlinks. The HyperlinkDialog inserts a HypertextLink to an external location or a DocumentLink to a position in the same document. At a link, it shows the link's data for editing or deletion.
  • Bookmarks. The BookmarkDialog inserts a bookmark at the input position or edits the name of the bookmark there. The DeleteBookmarksDialog lists all bookmarks of the document; the user jumps to one or deletes one or more.
  • Go to. The GotoDialog moves the input position to a page, section, line, table or bookmark and marks the new position.
  • Symbols. TextControl.AddSymbolDialog opens a dialog box that inserts a symbol character.

Fields, Hyperlinks, and Bookmarks describes links and bookmarks.

Subtext Parts

The main text, text frames, headers and footers are the text parts of a document. A SubTextPart is a smaller piece of text that you define to work on it separately. See Subtext Parts.

  • Defining one. A subtext part is defined by a start position and a length or by a selection. TextControl.SubTextParts returns the SubTextPartCollection of the main text, which adds and removes subtext parts; text frames, headers and footers have their own.
  • Name, ID and highlighting. A subtext part has a name and an ID. It is highlighted always or only while it contains the input position, set with HighlightMode.
  • Nesting. Subtext parts can contain other subtext parts, but they can't overlap.
  • Saving. SubTextPart.Save saves the content to a byte array or a string, in every format TX Text Control supports.
  • Events. SubTextPartEntered, SubTextPartLeft, SubTextPartClicked and SubTextPartDoubleClicked occur on the TextControl.

Formatted Text

Editing

Document Properties

General document properties are saved with every supported format: SaveSettings.Author, CreationDate, CreatorApplication, DocumentKeywords, DocumentSubject and LastModificationDate. After a document is loaded, the properties of the same names of LoadSettings, such as LoadSettings.Author, return them. See Document Properties.

Mail Merge

MailMerge creates documents from a template and data.

  • Merge blocks as subtext parts. Merge blocks, the sections of a template that are repeated for each record, are stored as subtext parts instead of document targets. Templates with blocks in the old format still load. See Merge Blocks.
  • A single object. MailMerge.MergeObject merges one object. Before, a single record of object data had to be wrapped in an enumerable type such as an array or a list. See Objects and Collections.
  • Empty blocks and images. RemoveEmptyBlocks and RemoveEmptyImages remove the content of merge blocks and the images for which there is no merge data. See Conditional Content.
  • The data of a merge block. The BlockMerging event occurs before a merge block is merged. Its BlockMergingEventArgs contain the name of the block, the column names of its table and, in BlockData, its data. See Merge Events.
  • Data adapters. The interfaces IDataTableAdapter and IDataRowAdapter describe the tables and rows of this data: table name, column names, child tables, rows and child rows.

Upgrade to Version 23.0

  • Merge block format. Templates created with version 23.0 store merge blocks as subtext parts. Templates with blocks in the old format, based on document targets, still load.
  • Update notes. TextFrameCollection.Add and BarcodeCollection.Add received the overloads for inserting a frame with the mouse.
  • Obsolete members. ListFormat.CharAfterNumber and CharBeforeNumber, which the list of version 23.0 names, are obsolete today; Deprecated APIs names their replacements.
  • Other breaking changes. 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 23.0 lists for TX Text Control .NET for Windows Forms. Names are relative to the TXTextControl namespace. Each name links to its current reference page, and "(obsolete)" marks the members that are obsolete today. The list includes the members of ServerTextControl, the document processing class without a user interface that is part of this product too, and it also names classes that existed before, such as SaveSettings and ListFormat, as it appears in that documentation. The reference marks the Charts property of FootnoteSection and FootnoteText as introduced in version 23.0, but both classes came with footnotes in version 32.0, so they are left out here.

New Classes

.NET Members by Class

ClassPropertiesMethodsEvents
BookmarkDialogFindItem
DataVisualization.DrawingCollectionAdd, CopyTo, DeactivateItem, GetActivatedItem, GetItem, Remove
DataVisualization.DrawingEventArgsDrawingFrame
DataVisualization.DrawingFrameDrawing, ExportCompressionQuality, ExportFileName, ExportFilterIndex, ExportResolution, SaveModeActivate, AddUndoUnit, Refresh
DeleteBookmarksDialogFindItem
DocumentServer.DataSources.IDataRowAdapterItem, TableGetChildRows
DocumentServer.DataSources.IDataTableAdapterChildTableNames, ColumnNames, Rows, TableName
DocumentServer.MailMergeRemoveEmptyBlocks, RemoveEmptyImagesMergeObjectBlockMerging
DocumentServer.MailMerge.BlockMergingEventArgsBlockData, BlockName, ColumnNames
DocumentServer.MailMerge.ImageMergedEventArgsMerged
Drawing.SelectionCanBringForward, CanBringToFront, CanSendBackward, CanSendToBack, ShapesBringForward, BringToFront, IsCommonValueSelected, SendBackward, SendToBack
Drawing.ShapeAngle, AutoSize, Bounds, CanFitToCanvas, Flip, Index, IsSelected, Location, Movable, ShapeFill, ShapeOutline, Sizable, Size, TypeFitToCanvas
Drawing.Shape.FillColor
Drawing.Shape.OutlineColor, Width
Drawing.ShapeCollectionItemAdd, Insert, Remove
Drawing.ShapeEventArgsShape
Drawing.ShapesContextMenuStripSelectedShapesMenuItems, StandardMenuItems
Drawing.TXDrawingControlBackColor, BorderColor, BorderWidth, CanCopy, CanPaste, CanRedo, CanUndo, IsCanvasVisible, Selection, Shapes, ZoomFactorClearUndo, Copy, Cut, FormatShapesDialog, Load, Paste, PrintPaint, Redo, Save, SaveImage, SelectAll, SizeToContent, UndoAdaptBounds, Changed, ShapeAdjusted, ShapeClicked, ShapeCreated, ShapeDeselected, ShapeFlipped, ShapeFormatChanged, ShapeMoved, ShapeSelected, ShapeSized, ViewChanged
GotoDialogFindItem
HeaderFooterBarcodes, Charts, DocumentLinks, DocumentTargets, Drawings, Frames, SubTextParts
HyperlinkDialogFindItem
IFormattedTextBarcodes, DocumentLinks, DocumentTargets, Drawings, Frames, SubTextParts
ListFormatBulletCharacter, BulletSize, CharAfterNumber (obsolete), CharBeforeNumber (obsolete), FirstNumber, FontName, FormatCharacter, HangingIndent, LeftIndent, Level, NumberFormat, RestartNumbering, Type
LoadSettingsAuthor, CreationDate, CreatorApplication, DocumentKeywords, DocumentSubject, LastModificationDate, LoadSubTextParts
MainTextCharts
SaveSettingsAuthor, BytesWritten, CreationDate, CreatorApplication, CssFileName, CssSaveMode, DocumentKeywords, DocumentSubject, DocumentTitle, ImageSavePath, LastModificationDate, PageMargins, PageSize, SavedFile, SavedStreamType
ServerTextControlDrawings, SubTextPartsOnDrawingCreated, OnDrawingDeletedDrawingCreated, DrawingDeleted
SubTextPartHighlightColor, HighlightMode, ID, Length, Name, NestedLevel, Number, OuterMostSubTextPart, OuterSubTextPart, Start, TextSave, ScrollTo
SubTextPartCollectionCount, IsSynchronized, Item, SyncRootAdd, CopyTo, GetEnumerator, GetItem, Remove
SubTextPartEventArgsSubTextPart
TextCharCollectionAdd, Remove
TextControlDrawingMarkerLines, Drawings, SubTextPartsAddSymbolDialog, BeginUndoAction, DrawingLayoutDialog, EndUndoAction, OnDrawingActivated, OnDrawingClicked, OnDrawingCreated, OnDrawingDeactivated, OnDrawingDeleted, OnDrawingDeselected, OnDrawingDoubleClicked, OnDrawingMoved, OnDrawingRightClicked, OnDrawingSelected, OnDrawingSized, OnSubTextPartClicked, OnSubTextPartDoubleClicked, OnSubTextPartEntered, OnSubTextPartLeftDrawingActivated, DrawingClicked, DrawingCreated, DrawingDeactivated, DrawingDeleted, DrawingDeselected, DrawingDoubleClicked, DrawingMoved, DrawingRightClicked, DrawingSelected, DrawingSized, SubTextPartClicked, SubTextPartDoubleClicked, SubTextPartEntered, SubTextPartLeft
TextFrameBarcodes, Charts, DocumentLinks, DocumentTargets, Drawings, Frames, SubTextParts
TextFrameCollectionGetActivatedItem

Next Steps

  • Version 24.0: the features of the next version.
  • Version 22.0: the features of the previous version.
  • Older Versions: all versions from 29.0 back to 10.1.
  • TX Text Control X13 for Windows Forms, WPF, ASP.NET and ActiveX Released: the release announcement on the Text Control Blog.