What's New in TX Text Control .NET for WPF 22.0
Version 22.0 rebuilt the WPF controls of TX Text Control on the classes of the WPF framework. The TextControl became a templated control, the button bar a WPF toolbar, and two ribbon tabs and four dialog boxes for links, bookmarks and navigation were added. For documents, the version switched image handling to the Windows Imaging Component and added JavaScript actions to PDF documents.
Version 22.0 was released in April 2015 as TX Text Control X12, together with TX Spell .NET 6.0, as the blog article TX Text Control X12 and TX Spell 6.0 Released announced. Its changes to the HTML5 Web Editor, an ASP.NET control of TX Text Control .NET Server, aren't part of TX Text Control .NET for WPF and aren't listed here.
Version 22.0 at a Glance
| Area | What is new |
|---|---|
| WPF controls | Controls derived from System.Windows.Controls.Control, with templates that other elements can overlap |
| Button bar | A ToolBar with its buttons and combo boxes as items |
| Ribbon | Ribbon tabs for formatting and for inserting objects |
| Dialog boxes | Hyperlinks, bookmarks, deleting bookmarks, going to a position, text and background color |
| Images | Loading and saving with the Windows Imaging Component, TIF and GIF export |
| Document-level JavaScript actions | |
| Text positions | Input position markers, scrolling to the input position, headers and footers of a page |
WPF Control Presentation
The WPF controls of TX Text Control derive from System.Windows.Controls.Control instead of System.Windows.FrameworkElement. A WPF.TextControl is a sealed template of other WPF controls, which fits it into the WPF framework: other elements of a window can overlap the TextControl or a toolbar of TX Text Control.
- Document. A WPF.TextControlDocument object is the part of the
TextControltemplate that represents the document. See TextControlDocument. - Toolbars. WPF.TextControlToolBar is the base class of
WPF.RulerBarandWPF.StatusBar, and a WPF.TextControlToolBarPresenter is part of its template.
Button Bar
WPF.ButtonBar derives from System.Windows.Controls.ToolBar:
- Items. Its default buttons and combo boxes are the items of its
Itemsproperty. Code can sort, delete and move them and add new ones; at design time, the collection editor does the same. - Toolbar trays. A button bar can be placed in a
System.Windows.Controls.ToolBarTray. - Frame. The frame of the button bar is designed with the
BorderBrushandBorderThicknessproperties it inherits.
Toolbars and Mini Toolbars covers the toolbars of the current version.
Ribbon Tabs
Two ribbon tabs derived from System.Windows.Controls.Ribbon.RibbonTab can be hosted in a System.Windows.Controls.Ribbon.Ribbon:
- Formatting. WPF.RibbonFormattingTab sets font and paragraph attributes and formatting styles and handles the clipboard.
- Insert. WPF.RibbonInsertTab inserts pages, images, hyperlinks, bookmarks, headers and footers, text frames and symbols.
The properties RibbonFormattingTab and RibbonInsertTab of the TextControl take the name of the tab to connect. Built-in Ribbon Tabs lists all tabs of the current version.
Dialog Boxes
- Hyperlinks. WPF.HyperlinkDialog inserts a
HypertextLinkto an external location or aDocumentLinkto a place in the same document. When the input position is on a link, the dialog box shows its data, which can be changed, or deletes the link. - Bookmarks. WPF.BookmarkDialog inserts a bookmark, a
DocumentTarget, at the input position, or shows and renames the bookmark that is there. WPF.DeleteBookmarksDialog lists all bookmarks of the document, moves to one or deletes one or more of them. - Go to. WPF.GotoDialog moves the input position to a page, section, line, table or bookmark and marks the new position.
- Colors. ForeColorDialog and TextBackColorDialog of the
TextControlopen the dialog boxes for the text color and the background color of the text.
Document Processing
- Images. TX Text Control loads and saves images with the Windows Imaging Component (WIC). Images can also be exported as TIF and GIF, selected with Image.ExportFilterIndex for one image or SaveSettings.ImageExportFilterIndex for all images of a document.
- JavaScript in PDF documents. SaveSettings.DocumentLevelJavaScriptActions takes an array of scripts that are embedded at document level and run when the PDF document is opened. PDF/A documents don't get them. See PDF Creation and Conversion.
- Input position. InputPosition.InactiveMarker shows a marker at the input position while the control is inactive and the caret isn't visible, and InputPosition.ScrollTo scrolls the input position into view. TextField.ContainsInputPosition and DocumentTarget.ContainsInputPosition tell whether a field or a target is at the input position.
- Headers and footers of a page. Page.Header and Page.Footer return the header and the footer of a page, or
nullif the page has none. See Sections, Pages, Headers, and Footers.
Upgrade to Version 22.0
- Button bar layout.
ButtonPositions,ButtonOffsetsandButtonSeparatorsofWPF.ButtonBarare replaced by theItemsproperty. - Button bar frame.
ButtonBar.BorderStyleis replaced by the inheritedBorderBrushandBorderThicknessproperties. - Button bar styles.
ButtonBar.ButtonStyleandButtonBar.DisplayColorsare removed. The default items of the button bar are WPF controls, styled withSystem.Windows.Styleobjects. - Mouse position.
WPF.TextControl.MousePositionis removed. Take the position from theMouseEventArgsof theMouseMoverouted event of theTextControl, or callMouse.GetPosition. - Loaded event. A
WPF.TextControlis ready when its ownLoadedevent occurs. Code that works with theTextControlin theLoadedevent of the window has to move to the event of the control. See Control Initialization and Document Access.
New Classes, Properties, Methods and Events
The classes and members below are the ones that the What's New documentation of version 22.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.
New Classes
- WPF.BookmarkDialog
- WPF.DeleteBookmarksDialog
- WPF.GotoDialog
- WPF.HyperlinkDialog
- WPF.RibbonFormattingTab
- WPF.RibbonInsertTab
- WPF.TextControlDocument
- WPF.TextControlToolBar
- WPF.TextControlToolBarPresenter
Members by Class
Next Steps
- Version 23.0: the features of the next version.
- Version 21.0: automatic language detection, content control adapters and version information.
- Built-in Ribbon Tabs: the ribbon tabs of the current version.