TX Text Control .NET for WPF

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

Topic

Images and text frames can lie above or below the text and in front of or behind each other since TX Text Control 18.0, which introduced a z-order and transparent text frames. The WPF TextControl received a collection of all its frames, a context menu for misspelled words and a new status bar design.

Version 18.0 was released in August 2012 as TX Text Control X8, as the press release Press Release: TX Text Control X8 (18.0) Released announced. The charts that the version added are Windows Forms chart controls: ServerTextControl and the Windows Forms TextControl handle them, and the WPF TextControl has no chart collection.

Version 18.0 at a Glance

AreaWhat is new
Z-orderImages and text frames above or below the text, and in front of or behind each other
Text framesTransparency
FramesOne collection of all frames of the TextControl
Spell checkingIgnored and duplicate words, a context menu for misspelled words
Status barA color gradient, separator lines and a zoom track bar
ImagesThe EMF format, without an image filter

Charts in ServerTextControl

ServerTextControl can contain chart controls of the type System.Windows.Forms.DataVisualization.Charting.Chart, which is part of the .NET Framework from version 4 on.

  • Position. A DataVisualization.ChartFrame places the chart like an image or a text frame: as a character in the text, anchored to a paragraph or relative to the document. The frame is connected to a chart control through Chart, which holds the appearance and the data.
  • Collection. ServerTextControl.Charts returns a DataVisualization.ChartCollection, which adds and removes charts. The events ChartCreated and ChartDeleted report changes.
  • Formats. The TX Text Control format and RTF save a chart as a chart, which is rebuilt when the document is loaded. Other formats save its image. On a system without the chart controls, the image is inserted instead.

Charts and Barcodes explains why charts can't be used with the WPF TextControl today.

Z-Order and Frames

  • Above and below the text. The new insertion modes AboveTheText and BelowTheText put an object in front of the text or behind it. ImageCollection.Add, TextFrameCollection.Add and ChartCollection.Add accept them, as do the InsertionMode properties of images, text frames and frames.
  • Change the order. ChangeZOrder moves an image, text frame or chart one plane up or down, or to the top or the bottom. Objects inserted as characters always have the z-order 0.
  • Transparent text frames. TextFrame.Transparency takes a value from 0, opaque, to 255, completely transparent, so that objects behind the frame show through.
  • All frames. WPF.TextControl.Frames and ServerTextControl.Frames return a FrameCollection with all frames of the text part that has the input focus. It changes their common attributes and returns the selected frame.

Status Bar

WPF.StatusBar has a new background with a vertical color gradient and separator lines between its parts:

Rulers and Status Bar describes the status bar of the current version.

More Changes

  • Text parts. Two new overloads of TextPartCollection.GetItem return the offset of a text part from the top left corner of the control and the text part at a given location.
  • Spell checking. MisspelledWord.IsIgnored marks a misspelled word as ignored: it stays in the collection but isn't underlined. MisspelledWord.IsDuplicate tells whether the word repeats the word in front of it. MisspelledWordCollection.Ignore ignores a word, and GetCount counts the words of one kind. WPF.TextControl.SpellCheckContextMenu specifies the context menu that opens when a user right-clicks a misspelled word: a built-in default menu or one of your own.
  • EMF images. TX Text Control supports the Windows Enhanced Metafile format (EMF). EMF and WMF images are handled internally, so the WMF image filter is no longer needed.
  • Initialization. ServerTextControl.IsCreated tells whether the control has been created completely.

Upgrade to Version 18.0

New Classes, Properties, Methods and Events

The classes and members below are the ones that the What's New documentation of version 18.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