TX Text Control .NET for WPF

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

Topic

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

AreaWhat is new
WPF controlsControls derived from System.Windows.Controls.Control, with templates that other elements can overlap
Button barA ToolBar with its buttons and combo boxes as items
RibbonRibbon tabs for formatting and for inserting objects
Dialog boxesHyperlinks, bookmarks, deleting bookmarks, going to a position, text and background color
ImagesLoading and saving with the Windows Imaging Component, TIF and GIF export
PDFDocument-level JavaScript actions
Text positionsInput 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.

Button Bar

WPF.ButtonBar derives from System.Windows.Controls.ToolBar:

  • Items. Its default buttons and combo boxes are the items of its Items property. 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 BorderBrush and BorderThickness properties 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 HypertextLink to an external location or a DocumentLink to 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 TextControl open the dialog boxes for the text color and the background color of the text.

See Built-in Dialog Boxes.

Document Processing

Upgrade to Version 22.0

  • Button bar layout. ButtonPositions, ButtonOffsets and ButtonSeparators of WPF.ButtonBar are replaced by the Items property.
  • Button bar frame. ButtonBar.BorderStyle is replaced by the inherited BorderBrush and BorderThickness properties.
  • Button bar styles. ButtonBar.ButtonStyle and ButtonBar.DisplayColors are removed. The default items of the button bar are WPF controls, styled with System.Windows.Style objects.
  • Mouse position. WPF.TextControl.MousePosition is removed. Take the position from the MouseEventArgs of the MouseMove routed event of the TextControl, or call Mouse.GetPosition.
  • Loaded event. A WPF.TextControl is ready when its own Loaded event occurs. Code that works with the TextControl in the Loaded event 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

Members by Class

Next Steps