Classes by Task
Which classes do you need to format text, fill a table, add a toolbar or merge a template? The .NET reference sorts the classes of TX Text Control .NET for Windows Forms by namespace; the sections below sort them by the task they solve. Each section starts from the entry point on TextControl, the control on your form, names the classes and members you work with and links the topic pages that show them in code.
Every class and member links to its page in the class library reference. TextControl and ServerTextControl share most of the document members, so a row that names TextControl.Tables applies to ServerTextControl.Tables as well. The events that react to the mouse, such as ImageClicked or TableFormatChanged, the toolbars, the ribbon and the dialog boxes exist only for TextControl. The last section, Base Classes and Interfaces, shows which classes share a base class.
Character Formatting
Character attributes such as font, size, color and underline are properties of the current selection. On an empty selection, they apply to the text typed or inserted next.
| Class or member | Use it to |
|---|---|
| TextControl.Selection, Selection | Read and set the font, size, bold, italic, underline, strikeout, baseline, text color and background color of the selected text |
| Selection.FontName, Selection.FontSize, Selection.Bold, Selection.Italic, Selection.Underline, Selection.ForeColor, Selection.TextBackColor | Change single character attributes |
| Selection.ChangeCapitalization, Selection.GrowFont, Selection.ShrinkFont, Selection.RemoveFormatting | Change the capitalization or the font size step by step, or remove the character formatting |
| TextControl.ForeColor, TextControl.TextBackColor, TextControl.FontUnderlineStyle, TextControl.Baseline | Set the default character format of the control, with TextControl.ResetForeColor and TextControl.ResetTextBackColor to go back to the defaults |
| TextControl.InputFormat, InputFormat | Read all formatting attributes at the input position in one object, for example to update your own toolbar |
| InputFormat.GetFontFamilies, InputFormat.GetFontSizes, InputFormat.UnderlineStyles, InputFormat.NumberFormats, InputFormat.StyleNames | Fill the combo boxes of a custom toolbar with fonts, sizes, underline styles, number formats and style names |
| TextControl.GetSupportedFonts | List the fonts the control can use |
| TextControl.FontDialog, TextControl.ForeColorDialog, TextControl.TextBackColorDialog, TextControl.LanguageDialog | Open the built-in dialog boxes for the font, the colors and the language |
| TextControl.CharFormatChanged | React when the character format at the input position changes |
Explained in Text and Paragraph Formatting and Text, Paragraphs, and Stylesheets.
Paragraph Formatting
| Class or member | Use it to |
|---|---|
| TextControl.ParagraphFormat, Selection.ParagraphFormat | Get the paragraph format of the paragraphs at the input position or in the selection |
| ParagraphFormat | Set the alignment, indents, line spacing, spacing before and after, frame lines, tabs, page breaks, widow and orphan control and structure level of paragraphs |
| ParagraphFormat.Alignment, ParagraphFormat.LeftIndent, ParagraphFormat.LineSpacing, ParagraphFormat.TabPositions, ParagraphFormat.KeepWithNext, ParagraphFormat.StructureLevel | Frequently used paragraph attributes |
| TextControl.ParagraphFormatDialog, TextControl.TabDialog | Open the built-in dialog boxes for paragraphs and tabs |
| TextControl.ParagraphFormatChanged, TextControl.InputParagraphChanged | React when the paragraph format changes or the input position moves to another paragraph |
Explained in Text and Paragraph Formatting and Text, Paragraphs, and Stylesheets.
Stylesheet Formatting
Users apply and edit styles with the built-in dialog box; your code learns about their changes through events.
| Class or member | Use it to |
|---|---|
| TextControl.FormattingStylesDialog | Open the built-in dialog box that creates, deletes and changes formatting styles |
| TextControl.FormattingStyleChanged, TextControl.FormattingStyleListChanged | React when a style changes, or when styles are added, removed or renamed, for example to refill a style list |
| TextControl.InputFormattingStyleChanged | React when the input position moves to text with another style |
Explained in Stylesheets. The classes that define styles in code are listed in Styles.
Sections and Pages
A document is divided into sections, and each section defines its own page size, margins, columns and page border.
| Class or member | Use it to |
|---|---|
| TextControl.Sections, SectionCollection, Section | Add sections with SectionCollection.Add and get a section with SectionCollection.GetItem |
| Section.Format, SectionFormat | Set the page size, margins, orientation, columns, page border, break kind and page numbering of a section |
| PageSize, PageMargins, PageBorder | Describe the size, margins and border of a page |
| TextControl.PageSize, TextControl.PageMargins, TextControl.Landscape, TextControl.PageUnit | Set the page format of the whole document and the unit its measures use |
| TextControl.GetPages, PageCollection, Page | Get the formatted pages, their numbers, bounds, headers and footers, and render a page with Page.GetImage |
| TextControl.GetSupportedPaperSizes, PaperSize | List the paper sizes of the formatting device by name and size |
| TextControl.SectionFormatDialog, TextControl.PageColorDialog | Open the built-in dialog boxes for the page setup and the page color |
| TextControl.PageFormatChanged, TextControl.SectionChanged, TextControl.PageChanged | React to a changed page format and to the input position moving to another section or page |
Explained in Sections and Page Layout and Sections, Pages, Headers, and Footers.
Bulleted and Numbered Lists
| Class or member | Use it to |
|---|---|
| TextControl.ListFormat, Selection.ListFormat, Paragraph.ListFormat | Get the list format of the paragraphs at the input position, in the selection or of one paragraph |
| ListFormat | Set the list type, the bullet character, the number format, the level, the first number, the text before and after the number and the indents |
| Paragraph.ListNumber, Paragraph.ListNumberText | Read the number of a paragraph in its list and the text it shows |
| TextControl.ListFormatDialog | Open the built-in dialog box for bullets and numbering |
Explained in Bullets and Numbered Lists and Text, Paragraphs, and Stylesheets.
Toolbars
The button bar, the ruler bars and the status bar are separate Windows Forms controls that you connect to a TextControl through its properties. Mini toolbars appear next to the selected text or object.
| Class or member | Use it to |
|---|---|
| TextControl.ButtonBar, ButtonBar | Show and set font and paragraph attributes with a button bar |
| TextControl.RulerBar, TextControl.VerticalRulerBar, RulerBar | Show and set indents, margins and tabs with a horizontal and a vertical ruler bar |
| TextControl.StatusBar, StatusBar | Show the page, line, column, section, zoom factor and key states of the input position |
| ButtonBar.DisplayColors, RulerBar.DisplayColors, StatusBar.DisplayColors | Set the colors of the bars with ButtonBar.Colors, RulerBar.Colors and StatusBar.Colors |
| TextControl.ShowMiniToolbar, MiniToolbar, TextMiniToolbar, ObjectMiniToolbar | Show a mini toolbar for selected text or for a selected frame when a mouse button is released |
| TextControl.MiniToolbarOpening, MiniToolbarOpeningEventArgs | Replace or suppress a mini toolbar before it opens |
| TextControl.TextMiniToolbarInitialized, TextControl.ObjectMiniToolbarInitialized, MiniToolbarInitializedEventArgs | Change or extend a built-in mini toolbar after it has been created |
Explained in Toolbars and Mini Toolbars, Rulers and Status Bar and Themes, Colors, and Icons.
Ribbons
The ribbon is a Windows Forms tab control with predefined tabs for all features of the editor. It is connected to a TextControl like the toolbars.
| Class or member | Use it to |
|---|---|
| TextControl.Ribbon, Ribbon, RibbonForm | Connect a ribbon to the editor and host it in a form that draws the Quick Access Toolbar and contextual tabs in its border |
| RibbonFormattingTab, RibbonInsertTab, RibbonPageLayoutTab, RibbonViewTab, RibbonProofingTab, RibbonReferencesTab, RibbonPermissionsTab, RibbonFormFieldsTab, RibbonReportingTab | Add the predefined tabs |
| ContextualTabGroup, RibbonTableLayoutTab, RibbonFrameLayoutTab, RibbonChartLayoutTab, RibbonFormulaTab | Group tabs that are shown only in a certain context, such as the tabs for tables and table formulas, for images and other frames and for charts |
| RibbonTab, RibbonGroup, HorizontalRibbonGroup, DialogBoxLauncher | Build a custom tab from groups |
| RibbonButton, RibbonToggleButton, RibbonMenuButton, RibbonSplitButton, RibbonComboBox, RibbonTextBox, RibbonLabel, RibbonSeperator, RibbonToolTip | Add buttons, lists, text boxes, labels, separators and tooltips to a group |
| RibbonListView, RibbonListViewItem, RibbonListViewItemCollection | Show a list of items in one of three views |
| RibbonGroupCollection, RibbonItemCollection, ContextualTabGroupCollection | Go through and change the groups of a tab, the items of a group and the contextual tab groups |
| Ribbon.Colors | Set the colors of the ribbon |
| Sidebar, ResourceProvider | Give quick access to a predefined or your own panel beside the editor, and get the images and texts of the built-in ribbon items |
Explained in Built-in Ribbon Tabs, Custom Tabs and Commands, Sidebar and Panels and Localization and Resource Kit.
Loading and Saving
| Class or member | Use it to |
|---|---|
| TextControl.Load, TextControl.Save, TextControl.Append | Load a document from a file, a byte array or a string, save it, or append another document; without a file name, Load and Save open the built-in file dialog boxes |
| StreamType | Name the format to load or save, such as DOCX, RTF, HTML or PDF |
| LoadSettings, SaveSettings | Pass settings to a load or save operation and read information about the loaded document; both derive from LoadSaveSettingsBase |
| TextControl.DocumentSettings, DocumentSettings | Read and set the author, title, subject, keywords and other properties of the document |
| UserDefinedPropertyDictionary | Read and write user-defined document properties |
| EmbeddedFile | Embed files in PDF documents and read embedded files |
| DigitalSignature | Sign a PDF document with an X.509 certificate when it is saved |
| TextControl.ResetContents, TextControl.Clear | Delete the whole contents or the selected text |
| TextControl.DocumentLoaded, TextControl.ContentsReset, TextControl.Changed | React when a document has been loaded, the contents have been deleted or the document has changed |
Explained in Loading and Saving Documents, Loading Documents, Saving and Converting Documents, Document Properties, Attachments and Signing PDF Documents. Data Binding and Database Storage stores documents in a database.
Printing and Print Preview
| Class or member | Use it to |
|---|---|
| TextControl.Print | Print the document with the standard print dialog box or with the settings of a PrintDocument |
| TextControl.PrintPreview | Show the document in a print preview |
| TextControl.FormattingPrinter | Name the printer whose text dimensions are used to format the document |
| TextControl.CanPrint | Find out whether printing is allowed, for example to enable a menu item |
Explained in Printing and Print Preview and Printing.
Tables
Explained in Tables and Table Formulas and Tables and Calculations. Formula Functions lists the functions a formula can call.
Images
| Class or member | Use it to |
|---|---|
| TextControl.Images, ImageCollection | Insert an image with ImageCollection.Add, get one with ImageCollection.GetItem and remove it |
| Image | Set the file, the scaling, the insertion mode and the format an image is saved in |
| FrameBase | Position and size images, text frames, charts, barcodes, drawings and signature fields with the properties they share, such as FrameBase.Location, FrameBase.Size and FrameBase.InsertionMode |
| TextControl.ImageAttributesDialog | Open the built-in dialog box for the selected image |
| ImageEventArgs | Receive the image of TextControl.ImageCreated and TextControl.ImageDeleted, and of the mouse events TextControl.ImageClicked, TextControl.ImageDoubleClicked, TextControl.ImageSelected, TextControl.ImageMoved and TextControl.ImageSized |
Explained in Images and Images, Text Frames, and Shapes.
Text Frames
| Class or member | Use it to |
|---|---|
| TextControl.TextFrames, TextFrameCollection | Insert a text frame with TextFrameCollection.Add, get one and remove it |
| TextFrame | Set the border, background color, internal margins and insertion mode of a text frame, and work with its text through TextFrame.Selection, TextFrame.Paragraphs and TextFrame.Tables |
| TextControl.TextFrameAttributesDialog, TextControl.TextFrameMarkerLines | Open the built-in dialog box for the selected text frame, and show the borders of frames without a border line |
| TextFrameEventArgs | Receive the text frame of TextControl.TextFrameCreated and TextControl.TextFrameDeleted, of TextControl.TextFrameActivated and TextControl.TextFrameDeactivated, and of the mouse events such as TextControl.TextFrameClicked |
Explained in Text Frames and Shapes and Images, Text Frames, and Shapes.
Charts
| Class or member | Use it to |
|---|---|
| TextControl.Charts, ChartCollection | Insert a chart with ChartCollection.Add, get one and remove it |
| ChartFrame | Reach the chart object with ChartFrame.Chart and redraw it with ChartFrame.Refresh |
| TextControl.ChartLayoutDialog | Open the built-in dialog box for the layout of the selected chart |
| ChartEventArgs | Receive the chart of TextControl.ChartCreated and TextControl.ChartDeleted, and of the mouse events TextControl.ChartClicked, TextControl.ChartSelected, TextControl.ChartMoved and TextControl.ChartSized |
Explained in Charts and Barcodes of the Document Editor, Charts and Barcodes of Document Processing and Integrating Charts and Barcodes.
Barcodes
| Class or member | Use it to |
|---|---|
| TextControl.Barcodes, BarcodeCollection | Insert a barcode with BarcodeCollection.Add, get one and remove it |
| BarcodeFrame | Reach the barcode with BarcodeFrame.Barcode |
| TXBarcodeControl, TXBarcodeCore | Set the barcode type, its text and its colors |
| BarcodeTypeSettings | Apply settings that depend on the barcode type, such as a check value |
| TextControl.BarcodeLayoutDialog | Open the built-in dialog box for the layout of the selected barcode |
| BarcodeEventArgs | Receive the barcode of TextControl.BarcodeCreated and TextControl.BarcodeDeleted, and of the mouse events such as TextControl.BarcodeClicked |
Explained in Charts and Barcodes and, for templates, in Images and Barcodes of Mail Merge and Reporting.
Drawings and Shapes
| Class or member | Use it to |
|---|---|
| TextControl.Drawings, DrawingCollection | Insert a drawing with DrawingCollection.Add, get one and remove it |
| DrawingFrame | Reach the drawing with DrawingFrame.Drawing |
| TXDrawingControl, TXDrawingCore | Hold the shapes of a drawing, rendered as SVG: TXDrawingControl is the Windows Forms control, TXDrawingCore the class that specifies the shapes |
| ShapeCollection, Shape | Add, insert and remove shapes, and set their type, size, angle and position |
| Fill, Outline | Set the fill and the outline of a shape |
| Selection | Change the z-order of the selected shapes |
| ShapesContextMenuStrip | Use the default context menu of the TXDrawingControl |
| TextControl.DrawingLayoutDialog, TextControl.DrawingMarkerLines | Open the built-in dialog box for the layout of the selected drawing, and show the borders of drawings |
| DrawingEventArgs | Receive the drawing of TextControl.DrawingCreated and TextControl.DrawingDeleted, of TextControl.DrawingActivated and of the mouse events such as TextControl.DrawingClicked |
Explained in Text Frames and Shapes and Images, Text Frames, and Shapes.
Hypertext Links
| Class or member | Use it to |
|---|---|
| TextControl.HypertextLinks, HypertextLinkCollection, HypertextLink | Add links to targets outside the document and set their HypertextLink.Target |
| TextControl.DocumentTargets, DocumentTargetCollection, DocumentTarget | Add bookmarks, the targets of links inside the document |
| TextControl.DocumentLinks, DocumentLinkCollection, DocumentLink | Add links to targets in the same document |
| TextControl.HypertextLinkClicked, HypertextLinkEventArgs, TextControl.DocumentLinkClicked, DocumentLinkEventArgs | Open a link when the user clicks it |
| DocumentTargetEventArgs | Receive the bookmark of the TextControl.DocumentTargetCreated and TextControl.DocumentTargetDeleted events |
| HyperlinkDialog, BookmarkDialog, DeleteBookmarksDialog | Open the built-in dialog boxes for links and bookmarks |
Explained in Fields, Hyperlinks, and Bookmarks and Fields and Subtext Parts.
Signature Fields
| Class or member | Use it to |
|---|---|
| TextControl.SignatureFields, SignatureFieldCollection, SignatureField | Insert, get and remove signature fields |
| SignatureField.Image, SignatureImage | Place a signature image in a field |
| SignatureField.SignerData, SignerData | Store the name, title, address, contact information and reason of the suggested signer |
| SignatureFieldEventArgs | Receive the field of the TextControl.SignatureFieldCreated, TextControl.SignatureFieldDeleted and TextControl.SignatureFieldClicked events |
Explained in Signature Fields of the Document Editor and Signature Fields and Signature Appearance of Digital Signatures.
Form Fields
Explained in Form Fields and Conditional Instructions, Forms and Conditional Instructions and Conditional Instructions.
Selections and Input Position
| Class or member | Use it to |
|---|---|
| TextControl.Selection, Selection | Read and set the start and length of the selection, its text and its formatting |
| TextControl.Select, TextControl.SelectAll, TextControl.SelectWord | Select a range, the whole document or a word |
| Selection.Load, Selection.Save | Replace the selected text with text in a format, or save the selected text in a format |
| Selection.IsCommonValueSelected | Find out whether the whole selection shares a value |
| TextControl.InputPosition, InputPosition | Set the input position, read its page, line, column and section, and scroll it into view with InputPosition.ScrollTo |
| TextControl.InputPositionChanged | React when the caret moves |
| TextControl.HideSelection, TextControl.SelectionViewMode, TextControl.SelectObjects | Decide how the selection looks and whether a click selects objects behind the text |
Explained in Selections and Caret Position.
Text Fields
| Class or member | Use it to |
|---|---|
| TextControl.TextFields, TextFieldCollection, TextField | Insert, get and remove text fields, named ranges of text that code can find and change |
| TextControl.ApplicationFields, ApplicationFieldCollection, ApplicationField | Work with fields of Microsoft Word, such as MERGEFIELD, through their type name and parameters |
| TextControl.GetTextFields | Get the fields of all types in one call |
| TextControl.FieldCursor | Set the mouse cursor shown over a text field |
| TextFieldEventArgs | Receive the field of TextControl.TextFieldCreated and TextControl.TextFieldDeleted, of TextControl.TextFieldEntered and TextControl.TextFieldLeft and of TextControl.TextFieldClicked |
Explained in Fields, Hyperlinks, and Bookmarks and Fields and Subtext Parts.
Spell Checking and Hyphenation
| Class or member | Use it to |
|---|---|
| TextControl.SpellChecker, TextControl.IsSpellCheckingEnabled | Connect a TX Spell .NET spell checking component and turn checking on |
| TextControl.MisspelledWords, MisspelledWordCollection, MisspelledWord | Get, ignore and remove the misspelled words of a document |
| TextControl.SpellCheckDialog, TextControl.SpellCheckContextMenuStrip, ThesaurusDialog | Open the spelling and thesaurus dialog boxes, and set the context menu for misspelled words |
| TextControl.SpellCheckText, SpellCheckTextEventArgs | Check the spelling of changed text yourself when no spell checking component is connected |
| TextControl.IsHyphenationEnabled, TextControl.HyphenateWord, HyphenateWordEventArgs | Turn hyphenation on and hyphenate a word that doesn't fit on its line |
| TextControl.IsLanguageDetectionEnabled | Set a language for text with a neutral language automatically, with a spell checking component connected |
Explained in Spell Checking and Hyphenation and Integrating TX Spell .NET for Windows Forms.
Clipboard
| Class or member | Use it to |
|---|---|
| TextControl.Copy, TextControl.Cut, TextControl.Paste | Copy or move the selection to the clipboard and replace it with the contents of the clipboard |
| TextControl.CanCopy, TextControl.CanPaste | Enable the Copy, Cut and Paste commands of your menus |
| TextControl.GetClipboardFormats, ClipboardFormat | Find out which formats the clipboard holds, and paste only one of them with an overload of Paste |
| TextControl.AllowDrag, TextControl.AllowDrop, TextControl.DropFormats | Allow drag and drop from and into the control, and choose the formats it accepts |
Explained in Clipboard Operations and Drag and Drop.
Undo
| Class or member | Use it to |
|---|---|
| TextControl.Undo, TextControl.Redo | Undo and redo the last operation |
| TextControl.CanUndo, TextControl.CanRedo, TextControl.UndoActionName, TextControl.RedoActionName | Enable the Undo and Redo commands and label them with the operation they undo or redo |
| TextControl.BeginUndoAction, TextControl.EndUndoAction | Group several changes into one undo step |
| TextControl.AllowUndo, TextControl.ClearUndo | Turn the undo buffer on or off and empty it |
Explained in Undo and Redo.
Find and Replace
| Class or member | Use it to |
|---|---|
| TextControl.Find, FindOptions | Find text, with options such as whole words or case sensitivity; without parameters, Find opens the built-in Find dialog box |
| TextControl.Replace | Open the built-in Replace dialog box |
| HeaderFooter.Find, TextFrame.Find | Find text in a header, a footer or a text frame |
Explained in Search and Replace and Text, Paragraphs, and Stylesheets.
Viewing and Zooming
| Class or member | Use it to |
|---|---|
| TextControl.ViewMode | Show the document as pages, as continuous text or formatted to the size of the control |
| TextControl.ZoomFactor, TextControl.Zoom, ZoomOption | Set the zoom factor in percent, or zoom to the page width, the text width or the whole page |
| TextControl.Zoomed | React when the document has been zoomed |
| TextControl.ControlChars, TextControl.PermanentControlChars | Show paragraph marks, tabs and other control characters |
| TextControl.ScrollLocation, TextControl.ScrollBars, GotoDialog | Scroll the document, choose its scroll bars and go to a page |
Explained in Viewing, Zooming, and Navigation.
Restricted Access
| Class or member | Use it to |
|---|---|
| TextControl.EditMode | Protect the text of a document from editing and formatting |
| TextControl.DocumentPermissions, DocumentPermissions | Allow copying, formatting, printing and editing form fields in a read-only document |
| TextControl.EditableRegions, EditableRegionCollection, EditableRegion | Mark regions that stay editable in a read-only document, for everyone or for the names in TextControl.UserNames |
| TextControl.EditableRegionHighlightMode | Decide when editable regions are highlighted |
| EditableRegionEventArgs | Receive the region of TextControl.EditableRegionCreated, TextControl.EditableRegionDeleted, TextControl.EditableRegionEntered and TextControl.EditableRegionLeft |
Explained in Document Protection and Editable Regions and Document Protection and User Permissions.
Tracked Changes
| Class or member | Use it to |
|---|---|
| TextControl.IsTrackChangesEnabled | Record the changes users and your code make |
| TextControl.TrackedChanges, TrackedChangeCollection, TrackedChange | Read the changes of a document, with their kind, author and time, and accept or reject them with TrackedChangeCollection.Remove |
| TrackedChangesDialog | Open the built-in dialog box that lists the changes |
| CannotTrackChangeEventArgs | Decide what happens with a change that can't be tracked, in the TextControl.CannotTrackChange event |
| TrackedChangeEventArgs | Receive the change of the TextControl.TrackedChangeCreated, TextControl.TrackedChangeDeleted and TextControl.TrackedChangeChanged events |
Explained in Track Changes and Comments and Tracked Changes.
Comments
| Class or member | Use it to |
|---|---|
| TextControl.Comments, CommentCollection | Add comments to text with CommentCollection.Add, get and remove them |
| CommentedText | Read the comment, its author, time, replies and the text it belongs to |
| CommentsDialog, TextControl.CommentHighlightMode | Open the built-in dialog box for comments, and decide when commented text is highlighted |
| CommentEventArgs | Receive the comment of TextControl.CommentCreated, TextControl.CommentDeleted, TextControl.CommentChanged and TextControl.CommentedTextEntered |
Explained in Comments and Comments and Tracked Changes.
Control Settings
| Class or member | Use it to |
|---|---|
| TextControl.BorderStyle, TextControl.BackColor, TextControl.BackgroundStyle | Set the border, the background color and the page background of the control |
| TextControl.DisplayColors, TextControl.Colors | Set the colors of the desktop around the pages, the page shadows, the header and footer labels and the form field highlights |
| TextControl.AutoControlSize, AutoSize | Let the control grow and shrink with its text, with the TextControl.HExpanded, TextControl.VExpanded, TextControl.HShrunk and TextControl.VShrunk events |
| TextControl.AcceptsTab, TextControl.InsertionMode, TextControl.DialogUnit | Decide whether the TAB key types a tab, whether typing inserts or overwrites, and the unit of measures in the dialog boxes |
| TextControl.ClientToDocument, TextControl.DocumentToClient | Convert between pixels in the control and twips in the document |
| TextControl.HScroll, TextControl.VScroll | React when the document is scrolled |
| TextControl.TextContextMenuOpening, TextContextMenuEventArgs | Replace or change a built-in context menu before it opens |
| TextControl.FontSettings, FontSettings | Restrict the fonts a document can use, for example to embeddable fonts for PDF/A |
| TextControl.AdaptFont, AdaptFontEventArgs | Replace a font that isn't available |
| TextControl.GetVersionInfo, VersionInfo | Read the version, service pack and product level at run time |
| TextControl.EntryAssembly | Name the assembly that holds the license |
Explained in Architecture and Control Lifecycle, TextControl, Themes, Colors, and Icons, Context Menus, Font Embedding and Substitution and Licensing of Troubleshooting.
Paragraphs as Objects
| Class or member | Use it to |
|---|---|
| TextControl.Paragraphs, ParagraphCollection, Paragraph | Go through the paragraphs of a document by number or position |
| Paragraph.Text, Paragraph.Start, Paragraph.Length, Paragraph.Lines | Read the text, position and lines of a paragraph |
| Paragraph.Format, Paragraph.FormattingStyle | Read and change the format and style of a paragraph |
| Paragraph.Select, Paragraph.Save | Select a paragraph or save it in a format |
Explained in Text, Paragraphs, and Stylesheets and Selections and Caret Position.
Lines and Characters
| Class or member | Use it to |
|---|---|
| TextControl.Lines, LineCollection, Line | Read the text, page, baseline and bounds of each formatted line, find the line at a point with LineCollection.GetItem, and save a line with Line.Save |
| TextControl.TextChars, TextCharCollection, TextChar | Read each character and its bounds, find the character at a point with TextCharCollection.GetItem, and insert and remove characters with TextCharCollection.Add and TextCharCollection.Remove |
| TextControl.AddSymbolDialog | Open the built-in dialog box for inserting symbols |
Explained in Selections and Caret Position.
Text Parts
A document consists of text parts: the main text, headers and footers, text frames and footnote sections. Each of them implements IFormattedText, the interface with the collections that the sections above describe for the main text.
| Class or member | Use it to |
|---|---|
| TextControl.TextParts, TextPartCollection | Go through all text parts of a document and give one the input focus with TextPartCollection.Activate |
| MainText, FootnoteText, FootnoteSection | Reach the main text and the text of the footnotes |
| TextControl.MainTextActivated | React when the main text gets the input focus back from a header, a footer or a text frame |
| TextControl.SubTextParts, SubTextPartCollection, SubTextPart, SubTextPartEventArgs | Mark named ranges of text, such as the merge blocks of a template, and react when the input position enters or leaves one |
| TextControl.Frames, FrameCollection, FrameEventArgs | Go through the images, text frames, charts and barcodes of a document in one collection, and receive the frame of the frame events such as TextControl.FrameLayoutChanged |
Explained in Architecture and Control Lifecycle, Document Object Model, Subtext Parts and Fields and Subtext Parts.
Styles
| Class or member | Use it to |
|---|---|
| TextControl.ParagraphStyles, ParagraphStyleCollection, ParagraphStyle | Define and change styles for whole paragraphs |
| TextControl.InlineStyles, InlineStyleCollection, InlineStyle | Define and change character styles for words in a line |
| FormattingStyle.Apply, FormattingStyleCollection.Remove | Apply a changed style to the document or remove a style |
| Selection.FormattingStyle, Selection.RemoveInlineStyles | Assign a style to the selected text or remove inline styles from it |
Explained in Stylesheets and Text, Paragraphs, and Stylesheets.
Tables of Contents
| Class or member | Use it to |
|---|---|
| TextControl.TablesOfContents, TableOfContentsCollection | Insert a table of contents with TableOfContentsCollection.Add, get and remove it |
| TableOfContents | Set the title, the structure levels, links and page numbers, and rebuild it with TableOfContents.Update |
| TextControl.TableOfContentsDialog | Open the built-in dialog box for tables of contents |
| TableOfContentsEventArgs | Receive the table of contents of the TextControl.TableOfContentsCreated and TextControl.TableOfContentsDeleted events |
Explained in Tables of Contents.
Footnotes
| Class or member | Use it to |
|---|---|
| TextControl.Footnotes, FootnoteCollection | Insert a footnote with FootnoteCollection.Add, get and remove it, and set the number format and start number |
| Footnote | Read the number and text of a footnote and the position of its reference mark |
| FootnoteEventArgs | Receive the footnote of the TextControl.FootnoteCreated and TextControl.FootnoteDeleted events |
Explained in Footnotes.
Mail Merge
| Class or member | Use it to |
|---|---|
| MailMerge | Merge a template with data: MailMerge.LoadTemplate, MailMerge.MergeJsonData, MailMerge.MergeObjects and MailMerge.Merge |
| MailMerge.TextComponent | Connect the TextControl or ServerTextControl that holds the template and the result |
| FieldMergedEventArgs, DataRowMergedEventArgs, BlockMergingEventArgs, BlockRowMergedEventArgs | Change fields, records and blocks while they are merged |
| ImageFieldMergedEventArgs, ImageMergedEventArgs, ChartMergedEventArgs, BarcodeMergedEventArgs, FormFieldMergedEventArgs, IncludeTextMergingEventArgs | Change merged images, charts, barcodes and form fields, and included documents |
| IDataTableAdapter, IDataRowAdapter | Read the table and the rows of a merge block in the BlockMerging event |
| MergeCanceledException, ParserException | Handle a canceled merge and JSON that can't be parsed |
Explained in Overview, Data Sources and Merge Events of Mail Merge and Reporting.
Word Fields and Content Controls
The classes of TXTextControl.DocumentServer.Fields are field adapters: they wrap an ApplicationField and give typed access to Microsoft Word fields, legacy form fields and content controls.
| Class or member | Use it to |
|---|---|
| MergeField, IfField, IncludeText, DateField, NextField, NextIfField | Read and set the parameters of MERGEFIELD, IF, INCLUDETEXT, DATE, NEXT and NEXTIF fields |
| FormText, FormCheckBox, FormDropDown | Work with the legacy form fields of Microsoft Word |
| PlainTextContentControl, RichTextContentControl, CheckBoxContentControl, ComboBoxContentControl, DropDownListContentControl, DateContentControl | Work with the content controls of Microsoft Word |
| FieldAdapter.ShowDialog | Open the options dialog box of a field |
| DocumentController, FieldAdapterCollection | Handle documents on the server for the legacy ASP.NET Web Forms Document Viewer of TX Text Control .NET Server; not needed in a Windows Forms application |
Explained in Content Controls and Word Form Fields, Merge Fields and Conditional Content.
PDF Forms
| Class or member | Use it to |
|---|---|
| Forms | Read the AcroForm fields of a PDF document with Forms.GetAcroFormFields |
| FormField | Read the name, type and bounds all AcroForm fields share |
| FormTextField, FormCheckBox, FormRadioButton, FormComboBox, FormListBox, FormButton | Read the value of each kind of field |
| Lines, ContentLine | Find lines of text in a PDF document with their page and position |
Explained in Creating AcroForms, Reading Form Fields and Values and Text Extraction.
Reporting
| Class or member | Use it to |
|---|---|
| DataSourceManager | Load a data source and find out which tables, columns and relations it has, and insert merge blocks with DataSourceManager.InsertMergeBlock |
| DataTableInfo, DataColumnInfo, DataRelationInfo | Describe a table, a column and a parent-child relation, in the collections DataTableInfoCollection, DataColumnInfoCollection and DataRelationInfoCollection |
| MergeBlockInfo, MergeBlockSettings | Describe a merge block and how it is inserted |
| FilterInstruction, SortingInstruction | Filter and sort the records of a merge block |
| MergeSettings | Pass settings to DataSourceManager.Merge |
| InsertMergeBlockDialog, EditMergeBlocksDialog, FilterAndSortDialog, EditDataRelationsDialog, DatabaseConnectionDialog, DataSourceExtractionDialog, ChartDataRelationDialog | Open the dialog boxes of the Reporting tab from your own user interface |
Explained in Data Sources, Merge Blocks, Nested Blocks and Master-Detail Reports, Sorting and Filtering and Reporting Ribbon and Dialog Boxes.
XML
| Class or member | Use it to |
|---|---|
| TextControl.XmlEditMode | Validate an XML document against its DTD while it is edited |
| TextControl.GetXmlElements, XmlElementCollection | Get all elements of an XML document with the same name |
| XmlElement | Read and change the text of an element and add, get and remove child elements |
| TextControl.XmlInvalid, TextControl.XmlNotWellFormed, XmlErrorEventArgs | Find out why an XML document is invalid or not well-formed, with the line and position of the error |
Explained in XML Processing.
Exceptions
| Class or member | Use it to |
|---|---|
| FilterException, FilterException.Reason | Handle errors of loading, saving and converting documents |
| LicenseLevelException | Handle a feature that the licensed product level doesn't include |
| TextEditorException | Handle errors of the text engine |
| FormulaException, NumberFormatException | Find the invalid character of a table formula or number format with their CharacterIndex |
| MergeCanceledException, ParserException | Handle a canceled merge and JSON that can't be parsed |
Explained in Exceptions and Error Handling.
Base Classes and Interfaces
Many classes share a base class that defines their common members. The reference documents a member on the base class, so a property such as Location of an image is found on the page of FrameBase. The hierarchy below lists the base classes the reference documents and the Windows Forms classes the controls derive from; each class name is linked in the table after it.
System.Windows.Forms.Control
├── TextControl (implements IFormattedText)
├── ButtonBar
├── RulerBar
├── StatusBar
└── Drawing.TXDrawingControl
System.ComponentModel.Component
├── ServerTextControl (implements IFormattedText)
├── DocumentServer.MailMerge
└── DocumentServer.DocumentController
System.Windows.Forms.ToolStripDropDown
└── MiniToolbar
├── TextMiniToolbar
└── ObjectMiniToolbar
System.Windows.Forms.TabControl System.Windows.Forms.TabPage
└── Windows.Forms.Ribbon.Ribbon └── Windows.Forms.Ribbon.RibbonTab
└── RibbonFormattingTab and the other predefined tabs
System.Windows.Forms.Panel Windows.Forms.Ribbon.RibbonButton
└── Windows.Forms.Ribbon.RibbonGroup ├── RibbonToggleButton
└── HorizontalRibbonGroup └── RibbonMenuButton
└── RibbonSplitButton
FrameBase
├── Image
├── TextFrame (implements IFormattedText)
├── SignatureField
├── DataVisualization.ChartFrame
├── DataVisualization.BarcodeFrame
└── DataVisualization.DrawingFrame
FrameBaseCollection
├── ImageCollection
├── TextFrameCollection
├── SignatureFieldCollection
├── FrameCollection
├── DataVisualization.ChartCollection
├── DataVisualization.BarcodeCollection
└── DataVisualization.DrawingCollection
TableBaseCollection
└── TableCollection
TablePartCollection
├── TableRowCollection
├── TableColumnCollection
└── TableCellCollection
TextField
├── ApplicationField
├── HypertextLink
├── DocumentLink
├── PageNumberField
└── FormField
├── TextFormField
├── CheckFormField
├── SelectionFormField
└── DateFormField
TextFieldCollectionBase
├── TextFieldCollection
├── ApplicationFieldCollection
├── HypertextLinkCollection
├── DocumentLinkCollection
├── PageNumberFieldCollection
└── FormFieldCollection
FormattingStyle FormattingStyleCollection
├── ParagraphStyle ├── ParagraphStyleCollection
└── InlineStyle └── InlineStyleCollection
LoadSaveSettingsBase
├── LoadSettings
└── SaveSettings
IFormattedText is implemented by TextControl, ServerTextControl, MainText, HeaderFooter, TextFrame, FootnoteText and FootnoteSection. Code written against the interface works with the main text and with every other text part, in the editor and without it.
The exception classes FilterException, FormulaException, NumberFormatException, LicenseLevelException, TextEditorException and MergeCanceledException derive from System.Exception. Most event argument classes derive from System.EventArgs; CannotTrackChangeEventArgs and BlockMergingEventArgs derive from System.ComponentModel.CancelEventArgs.