TX Text Control .NET for Windows Forms

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

Topic

Version 24.0 gave Windows Forms applications a ribbon: a RibbonForm main window, a Ribbon with an application menu and contextual tabs, and predefined tabs that cover the features of the TextControl. Colored paragraphs, user-defined document properties, zoom options, typed exceptions and a mail merge that reads JSON data came with it, together with dialog boxes and the DataSourceManager class for building mail merge templates.

Version 24.0 was released on November 30, 2016, as TX Text Control X14, 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 2, is dated June 13, 2017. The features below are the ones added since version 23.0.

Version 24.0 at a Glance

AreaWhat is new
RibbonsRibbonForm, Ribbon, predefined ribbon tabs, contextual tab groups, a quick access toolbar
Viewing and toolbarsZooming to the whole page, the page width or the text width, read-only toolbars
FormattingColored paragraph backgrounds and frame lines, new InputFormat properties, paper sizes of the printer
DocumentsUser-defined document properties, encrypted PDF import, typed exceptions
Text fieldsText fields of several types in document order
Mail mergeJSON data, the template location in merge events, DataSourceManager and dialog boxes for merge blocks and data sources

Windows Forms Ribbon Controls

The class library received the controls to build a Windows Forms application with a ribbon instead of a menu and toolbars. See Built-in Ribbon Tabs.

Custom Tabs and Commands adds tabs and groups of your own.

Viewing and Toolbars

Colored Paragraphs and Text Formatting

See Text and Paragraph Formatting.

Paper Sizes

TextControl.GetSupportedPaperSizes returns the names and sizes of all paper sizes that are supported at the moment, as PaperSize objects. The list depends on the formatting device, set with TextControl.FormattingPrinter. See Sections, Pages, Headers, and Footers.

User-Defined Document Properties

SaveSettings.UserDefinedDocumentProperties takes a UserDefinedPropertyDictionary with properties of the types String, Boolean, Int32 and Double, which are saved with the document. The TX Text Control format, RTF, DOC and DOCX support them. After a document is loaded, LoadSettings.UserDefinedDocumentProperties returns them. See Document Properties.

Text Fields

IFormattedText.GetTextFields and TextControl.GetTextFields return the text fields of one or more field types. With several types, the fields are in the order in which they appear in the document. PageNumberFieldCollection.GetItem gets one page number field of a collection. See Fields, Hyperlinks, and Bookmarks.

PDF Import and Error Handling

  • Encrypted PDF files. PDF import loads encrypted files. See Passwords and Access Permissions.
  • Typed exceptions. A TextControl throws a TextEditorException when an error occurs while text is edited and a FilterException, with its Reason, when a document can't be converted from or to another format. A LicenseLevelException means that the licensed product level doesn't contain a feature.
  • Standard exceptions. A parameter or property value that is wrong raises an ArgumentException, an ArgumentNullException or an ArgumentOutOfRangeException, and a call that is invalid in the object's current state an InvalidOperationException.

See Exceptions and Error Handling.

Mail Merge

MailMerge creates documents from a template and data.

  • JSON data. MailMerge.MergeJsonData merges a JSON string with a single object or an array of objects with the same structure. See JSON and XML.
  • Where an event occurred. Most events of a merge run tell where in the template they occurred: FieldMergedEventArgs, ImageMergedEventArgs and ImageFieldMergedEventArgs received MergeBlockName, NestingDepth and, depending on the class, TableCell and DataRow. See Merge Events.
  • Data source information. DataSourceManager handles the supported kinds of data, from data sets and data tables to JSON, XML, objects and assemblies, describes their tables, columns and relations, inserts merge block templates and merges. The classes DataTableInfo, DataColumnInfo, DataRelationInfo, MergeBlockInfo and MergeBlockSettings came with it, and RibbonReportingTab.DataSourceManager gives the reporting tab its data.
  • Merge block names. MailMerge.MergeBlockNamePrefix returns the prefix txmb_ of internal merge block names, and LoadSaveSettingsBase.ReportingMergeBlockFormat sets how merge blocks are saved in a document.

Dialog Boxes for Templates

The new namespace DocumentServer.Windows.Forms holds modal dialog boxes, each shown with its ShowDialog method:

Dialog boxLets the user
InsertMergeBlockDialogDesign a merge block based on the current data source and insert it
EditMergeBlocksDialogRemove or rename the merge blocks of the document
DatabaseConnectionDialogBuild a connection string and connect to a data source
EditDataRelationsDialogAdd data relations to the data source or remove them
DataSourceExtractionDialogSave an excerpt of the loaded data source

Reporting Ribbon and Dialog Boxes describes the reporting tab and its dialog boxes today.

Upgrade to Version 24.0

New Classes, Properties, Methods and Events

These are the classes and members that the What's New documentation of version 24.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. 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 ParagraphFormat, as it appears in that documentation.

New Classes

.NET Members by Class

ClassPropertiesMethodsEvents
ButtonBarReadOnly
DocumentServer.DataSources.DataColumnInfoCaption, ColumnName, DataTableInfo, DataType
DocumentServer.DataSources.DataColumnInfoCollectionCount, IsReadOnly, ItemCopyTo, GetEnumerator
DocumentServer.DataSources.DataRelationInfoChildColumnName, ChildTableName, ParentColumnName, ParentTableName, RelationName
DocumentServer.DataSources.DataRelationInfoCollectionCount, IsReadOnly, ItemCopyTo, GetEnumerator
DocumentServer.DataSources.DataSourceManagerConnectionString, DataProviderName, DataRelations, DataTables, IsMergingPossible, MasterDataTableInfo, PossibleMergeBlockTables, PossibleMergeFieldColumnsInsertMergeBlock, IsMergeBlock, LoadAssembly, LoadDataSet, LoadDataSourceConfig, LoadDataTable, LoadJson, LoadObjects, LoadSingleObject, LoadXmlFile, LoadXmlString, Merge, SaveDataSourceConfigConnectionStringChanged, DataProviderNameChanged, DataRelationsChanged, DataTablesChanged, IsMergingPossibleChanged, MasterDataTableInfoChanged, PossibleMergeBlockTablesChanged, PossibleMergeFieldColumnsChanged
DocumentServer.DataSources.DataTableInfoChildRelations, ChildTables, Columns, TableName
DocumentServer.DataSources.DataTableInfoCollectionCount, IsReadOnly, ItemCopyTo, GetEnumerator
DocumentServer.DataSources.MergeBlockInfoChildBlocks, ColumnNames, TableName
DocumentServer.DataSources.MergeBlockSettingsBlockTemplateType, CreateHeaderRow, FieldDisplayMode, HighlightColor
DocumentServer.MailMergeMergeBlockNamePrefixMergeJsonData
DocumentServer.MailMerge.DataRowMergedEventArgsDataRow
DocumentServer.MailMerge.FieldMergedEventArgsDataRow, MergeBlockName, NestingDepth, TableCell
DocumentServer.MailMerge.ImageFieldMergedEventArgsMergeBlockName, NestingDepth, TableCell
DocumentServer.MailMerge.ImageMergedEventArgsDataRow, MergeBlockName, NestingDepth
DocumentServer.Windows.Forms.DataSourceExtractionDialogFileName, MaxRows, SelectedTable
DocumentServer.Windows.Forms.InsertMergeBlockDialogAddTableHeaderRow, BlockType, HighlightColor, MergeBlockInfo
Drawing.ViewChangedEventArgsClipRectangle
FilterExceptionReason
FormattingStyleBaseStyle
FrameEventArgsFrame
HeaderFooterGetTextFields
IFormattedTextGetTextFields
InputFormatBottomAligned, FrameFillColor, FrameLineColor, FrameLineWidth, TopAligned, VerticallyCentered
LoadSaveSettingsBaseReportingMergeBlockFormat
LoadSettingsDocumentAccessPermissions, LoadDocumentBackColor, UserDefinedDocumentProperties
PageNumberFieldCollectionGetItem
PaperSizeHeight, Name, Width
ParagraphFormatAbsoluteLineSpacing, Alignment, BackColor, BottomDistance, Frame, FrameDistance, FrameLineColor, FrameLineWidth, FrameStyle, HangingIndent, LeftIndent, LineSpacing, RightIndent, TabPositions, TabTypes, TopDistance
RulerBarReadOnly
SaveSettingsSaveDocumentBackColor, UserDefinedDocumentProperties
SelectionRemoveInlineStyles
ServerTextControlGetSupportedPaperSizes, GetTextFields, OnDocumentLoadedDocumentLoaded
TextControlRibbonFrameFillColorDialog, FrameLineColorDialog, GetSupportedPaperSizes, GetTextFields, OnDocumentLoaded, OnFrameClicked, OnFrameDeselected, OnFrameDoubleClicked, OnFrameLayoutChanged, OnFrameMoved, OnFrameRightClicked, OnFrameSelected, OnFrameSized, OnTextFrameAppearanceChanged, PageColorDialog, ZoomDocumentLoaded, FrameClicked, FrameDeselected, FrameDoubleClicked, FrameLayoutChanged, FrameMoved, FrameRightClicked, FrameSelected, FrameSized, TextFrameAppearanceChanged
TextFrameGetTextFields
UserDefinedPropertyDictionaryItem, Names, ValuesAdd, Contains, Remove
Windows.Forms.Ribbon.ContextualTabGroupBackColor, ContextualTabs, Header, Name, Visible
Windows.Forms.Ribbon.DialogBoxLauncherContextMenuStrip, Enabled, ToolStripItemImage, ToolTip, VisibleClick
Windows.Forms.Ribbon.HorizontalRibbonGroupAdd, AddRange, Insert, InsertRange
Windows.Forms.Ribbon.RibbonApplicationMenuHelpPaneItems, ApplicationMenuItems, ContextualTabGroups, DisplayColors, ReadOnly
Windows.Forms.Ribbon.Ribbon.ColorsApplicationMenuColor, ApplicationMenuTabColor, ApplicationMenuTabHighlightColor, HighlightTabColor, MenuColor, TabColorResetApplicationMenuColor, ResetApplicationMenuTabColor, ResetApplicationMenuTabHighlightColor, ResetHighlightTabColor, ResetMenuColor, ResetTabColor
Windows.Forms.Ribbon.RibbonButtonDescription, DisplayMode, IsAddToQuickAccessToolbarEnabled, KeyTip, LargeIcon, ParentCollection, SmallIcon, Text, ToolTip
Windows.Forms.Ribbon.RibbonComboBoxKeyTip, ParentCollection, ToolTip
Windows.Forms.Ribbon.RibbonFormSetQuickAccessToolbarStandardItems
Windows.Forms.Ribbon.RibbonFormattingTabFindItem
Windows.Forms.Ribbon.RibbonFrameLayoutTabFindItem
Windows.Forms.Ribbon.RibbonGroupDialogBoxLauncher, IsAddToQuickAccessToolbarEnabled, LargeIcon, RibbonItems, RowCount, ShowSeperator, SmallIcon, Text, ToolTip
Windows.Forms.Ribbon.RibbonGroupCollectionItemAdd, Insert, Remove
Windows.Forms.Ribbon.RibbonInsertTabFindItem
Windows.Forms.Ribbon.RibbonItemCollectionItemAdd, AddRange, Contains, Insert, InsertRange, Remove
Windows.Forms.Ribbon.RibbonLabelParentCollection, SmallIcon, Text, ToolTip
Windows.Forms.Ribbon.RibbonListViewCellPadding, ColumnCount, ColumnWidth, Deselectable, DropDownItems, HideItems, HideSelectedItems, ItemsSource, KeyTip, MaxVisibleRows, MinColumnCount, MultiSelect, ParentCollection, RibbonListViewItems, RowCount, RowHeight, ScrollButtonsVisible, SelectedIndices, SelectedItems, ShowBorder, ShowItemsInDropDown, ToolTip, ViewModeScrollToDropDownClosed, DropDownOpening, ItemClick, ItemMouseEnter, ItemMouseLeave
Windows.Forms.Ribbon.RibbonListView.RibbonListViewItemIcon, IsSelected, Tag, Text, ToolTip
Windows.Forms.Ribbon.RibbonListView.RibbonListViewItemCollectionItemAdd
Windows.Forms.Ribbon.RibbonListView.RibbonListViewItemEventArgsItem
Windows.Forms.Ribbon.RibbonMenuButtonDropDownItemsDropDownClosed, DropDownOpening
Windows.Forms.Ribbon.RibbonPageLayoutTabFindItem
Windows.Forms.Ribbon.RibbonProofingTabFindItem
Windows.Forms.Ribbon.RibbonReportingTabDataSourceManagerFindItem
Windows.Forms.Ribbon.RibbonSeperatorAlignment, ParentCollection
Windows.Forms.Ribbon.RibbonSplitButtonButtonEnabled, Checkable, CheckedButtonClick, CheckedChanged
Windows.Forms.Ribbon.RibbonTabKeyTip, RibbonGroups
Windows.Forms.Ribbon.RibbonTableLayoutTabFindItem
Windows.Forms.Ribbon.RibbonTextBoxDisplayMode, KeyTip, Label, LargeIcon, ParentCollection, ShowUpDownButtons, SmallIcon, Text, TextAlign, TextBoxLabel, TextBoxWidth, ToolTip, ValidationModeDownButtonClicked, TextValidated, UpButtonClicked
Windows.Forms.Ribbon.RibbonToggleButtonCheckedCheckedChanged
Windows.Forms.Ribbon.RibbonToolTipDescription, TitleOpening
Windows.Forms.Ribbon.RibbonViewTabFindItem

Next Steps

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