TX Text Control .NET for Windows Forms Documentation

WPF.TextControl Class

The WPF.TextControl class class implements a control with high-level text editing features. It is inherited from the WPF.TextControlFrameworkElement class which is inherited from the System.Windows.FrameworkElement class. The following describes only the properties, methods and events defined through this class. For a list of inherited properties, methods and events see the .NET Framework reference. The WPF.TextControl class implements the IFormattedText interface.

Introduced: 16.0.

Syntax

[C#] public class TextControl : TextControlFrameworkElement, IFormattedText
[Visual Basic] Public Class TextControl Inherits TextControlFrameworkElement Implements IFormattedText

Constructors

ConstructorDescription
WPF.TextControlInitializes a new instance of the WPF.TextControl class.

Properties

PropertyDescription
AcceptsTabGets or sets a value indicating whether pressing the TAB key types a TAB character in the control instead of moving the focus to the next control in the tab order.
AllowDragGets or sets a value indicating whether the control can be a source of a Drag&Drop operation.
AllowDropInherited from System.Windows.UIElement.
ApplicationFieldsGets a collection of all Microsoft Word or Heiler HighEdit fields that have been created or imported from a Microsoft Word or RTF document.
AutoControlSizeGets or sets values that enable automatic expansion or shrinking of a Text Control's width or height depending on the currently contained text.
BaselineGets or sets the baseline alignment, in twips, of the Text Control.
BorderThicknessGets or sets the border thickness of the Text Control.
ButtonBarSpecifies the button bar control to be used with a TextControl.
CanCopyInforms whether a part of a Text Control document has been selected and can be copied to the clipboard.
CanPasteInforms whether the clipboard contains a format that can be pasted into a Text Control document.
CanRedoInforms whether an operation can be re-done using the Redo method.
CanUndoGets a value indicating whether the user can undo the previous operation in a Text Control.
CaretWidthGets or sets the width of the caret in pixels.
ControlCharsSpecifies if control characters are visible or not.
DisplayColorsGets or sets the colors of the text control.
DocumentLinksGets a collection of all links that point to targets in the same document.
DocumentTargetMarkersGets or sets a value indicating that markers for hypertext targets are shown or not.
DocumentTargetsGets a collection of all targets in the document.
DropFormatsGets or sets the formats of data the control can accept when the user drags it onto the control.
EditModeGets or sets a value indicating whether text in the Text Control is read-only, can be selected or is editable.
FieldCursorGets or sets the cursor that is displayed when the mouse pointer is over a marked text field.
FontFamilyGets or sets the font family of the text control.
FontSettingsGets a FontSettings object which provides properties determining which fonts can be used in a document.
FontSizeGets or sets the font size of the text control in device-independent units (1/96th inch).
FontStyleGets or sets the font style of the text control.
FontUnderlineStyleGets or sets the underlining style for the text displayed by the control.
FontWeightGets or sets the weight or thickness of the text control's font.
FormattingPrinterGets or sets the name of a printer the text dimensions and capabilities of which are used to format the document.
GetPagesGets a collection of all pages in the document.
HeaderFooterActivationStyleGets or sets a value specifying the activation style for headers and footers.
HeaderFooterFrameStyleGets or sets a value specifying the frame for activated headers and footers.
HeadersAndFootersGets a collection of all headers and footers the current document contains.
HideSelectionGets or sets a value indicating whether the selected text in the Text Control remains highlighted when the control loses focus.
HorizontalScrollBarVisibilityGets or sets a value that indicates whether a horizontal scroll bar is shown.
HypertextLinksGets a collection of all hypertext links contained in the text part with the input focus.
ImagesGets a collection of all images contained in the text part with the input focus.
InlineStylesGets a collection of all inline styles the current document contains.
InputFormatGets an object of the type InputFormat which represents all formatting attributes at the current text input position.
InputPositionGets or sets the current text input position.
InsertionModeSpecifies whether text is inserted or overwrites existing text.
IsSpellCheckingEnabledGets or sets a value indicating whether spell checking is active or not.
IsTabStopGets or sets a value that indicates whether a text control is included in tab navigation.
IsUndoEnabledGets or sets a value indicating whether the undo buffer is active or not.
LandscapeGets or sets a value indicating whether the page orientation is landscape or portrait.
LinesGets a collection of all lines contained in the text part with the input focus.
ListFormatGets or sets the type and the formatting attributes of a bulleted or numbered list.
MisspelledWordsGets a collection of all misspelled words contained in the text part with the input focus.
PageMarginsGets or sets the margins for the pages of the current document.
PagesGets the number of pages contained in the current document.
PageSizeSpecifies the width and height of the pages for the current document.
PageUnitGets or sets the measure used for page sizes and page margins.
ParagraphFormatGets or sets the paragraph formatting attributes of the text displayed by the control.
ParagraphsGets a collection of all paragraphs contained in the text part with the input focus.
ParagraphStylesGets a collection of all paragraph styles the current document contains.
RedoActionNameGets a string that represents the name of the action that will be performed when a call to the Redo method is made.
RulerBarSpecifies the horizontal ruler bar control to be used with a TextControl.
ScrollLocationGets or sets the coordinates, in twips, of the upper-left corner of the document's visible part relative to the upper-left corner of the complete document.
SectionsGets a collection of all sections in the document.
SelectionGets or sets the current selection in the text part with the input focus.
SelectionViewModeSpecifies whether text selections are displayed with a transparent bitmap or through inverting the text.
SpellCheckerSpecifies the spell checking component to be used with a TextControl.
StatusBarSpecifies the status bar control to be used with a TextControl.
TabIndexGets or sets the tab index of the text control.
TablesGets a collection of all tables contained in the text part with the input focus.
TextGets or sets the text contents of the text control.
TextCharsGets a collection of all characters contained in the text part with the input focus.
TextFieldsGets a collection of all standard text fields contained in the text part with the input focus.
TextFrameMarkerLinesSpecifies whether text frames that have no border line are shown with marker lines.
TextFramesGets a collection of all text frames the current document contains.
TextPartsGets a collection of all text parts the current document contains.
UndoActionNameGets a string that represents the name of the action that will be performed when a call to the Undo method is made.
VerticalRulerBarSpecifies the vertical ruler bar control to be used with a TextControl.
VerticalScrollBarVisibilityGets or sets a value that indicates whether a vertical scroll bar is shown.
ViewModeGets or sets the mode in which Text Control displays its contents.
XmlEditModeGets or sets a value specifying whether Text Control operates in an edit mode that validates the XML document according to the document's DTD.
ZoomFactorGets or sets the zoom factor, in percent, for a Text Control.

Methods

MethodDescription
AppendLoads text in a certain format from a file, a byte array or a string and appends it to the existing document.
ClearClears the selected text or the character right from the current input position from the Text Control.
ClearUndoClears the undo buffer of the Text Control.
CopyCopies the current selection in the Text Control to the Clipboard.
CutMoves the current selection in the Text Control to the Clipboard.
FindFinds a text string in the text part with the input focus.
FontDialogInvokes the built-in font dialog box.
FormattingStylesDialogInvokes the built-in dialog box for creating, deleting and modifying formatting styles.
GetClipboardFormatsReturns an array of ClipboardFormat values.
GetXmlElementsReturns a collection of XML elements.
ImageAttributesDialogInvokes the built-in dialog box for setting attributes of images.
ListFormatDialogInvokes the built-in dialog box for setting formatting attributes of bulleted and numbered lists.
LoadLoads text in a certain format from a file, a byte array or a string.
OnAdaptFontRaises the AdaptFont event.
OnChangedRaises the Changed event.
OnCharFormatChangedRaises the CharFormatChanged event.
OnDocumentLinkClickedRaises the DocumentLinkClicked event.
OnFormattingStyleListChangedRaises the FormattingStyleListChanged event.
OnHeaderFooterActivatedRaises the HeaderFooterActivated event.
OnHeaderFooterDeactivatedRaises the HeaderFooterDeactivated event.
OnHExpandedRaises the HExpanded event.
OnHScrollRaises the HScroll event.
OnHShrunkRaises the HShrunk event.
OnHypertextLinkClickedRaises the HypertextLinkClicked event.
OnImageClickedRaises the ImageClicked event.
OnImageCreatedRaises the ImageCreated event.
OnImageDeletedRaises the ImageDeleted event.
OnImageDoubleClickedRaises the ImageDoubleClicked event.
OnImageMovedRaises the ImageMoved event.
OnImageRightClickedRaises the ImageRightClicked event.
OnImageSizedRaises the ImageSized event.
OnInputFormattingStyleChangedRaises the InputFormattingStyleChanged event.
OnInputParagraphChangedRaises the InputParagraphChanged event.
OnInputPositionChangedRaises the InputPositionChanged event.
OnPageChangedRaises the PageChanged event.
OnPageFormatChangedRaises the PageFormatChanged event.
OnParagraphFormatChangedRaises the ParagraphFormatChanged event.
OnSectionChangedRaises the SectionChanged event.
OnSpellCheckTextRaises the SpellCheckText event.
OnTableCreatedRaises the TableCreated event.
OnTableDeletedRaises the TableDeleted event.
OnTableFormatChangedRaises the TableFormatChanged event.
OnTextFieldChangedRaises the TextFieldChanged event.
OnTextFieldClickedRaises the TextFieldClicked event.
OnTextFieldCreatedRaises the TextFieldCreated event.
OnTextFieldDeletedRaises the TextFieldDeleted event.
OnTextFieldDoubleClickedRaises the TextFieldDoubleClicked event.
OnTextFieldEnteredRaises the TextFieldEntered event.
OnTextFieldLeftRaises the TextFieldLeft event.
OnTextFrameActivatedRaises the TextFrameActivated event.
OnTextFrameClickedRaises the TextFrameClicked event.
OnTextFrameCreatedRaises the TextFrameCreated event.
OnTextFrameDeactivatedRaises the TextFrameDeactivated event.
OnTextFrameDeletedRaises the TextFrameDeleted event.
OnTextFrameDoubleClickedRaises the TextFrameDoubleClicked event.
OnTextFrameMovedRaises the TextFrameMoved event.
OnTextFrameRightClickedRaises the TextFrameRightClicked event.
OnTextFrameSizedRaises the TextFrameSized event.
OnVExpandedRaises the VExpanded event.
OnVScrollRaises the VScroll event.
OnVShrunkRaises the VShrunk event.
OnXmlInvalidRaises the XmlInvalid event.
OnXmlNotWellFormedRaises the XmlNotWellFormed event.
ParagraphFormatDialogInvokes the built-in dialog box for setting the formatting attributes of a paragraph.
PasteReplaces the current selection in the Text Control with the contents of the Clipboard.
PrintOverloaded. Prints a Text Control document or a part of a document.
RedoRedoes the last Text Control operation.
ReplaceOpens the built-in Replace dialog box.
ResetContentsDeletes the entire contents of a Text Control.
SaveOverloaded. Saves text in a certain format in a file, in a byte array or as a string.
SectionFormatDialogInvokes the built-in tabbed dialog box for setting section attributes.
SelectSelects text within the Text Control.
SelectAllSelects all text in the Text Control.
SpellCheckDialogInvokes the built-in dialog box for correcting misspelled words.
TabDialogInvokes the built-in dialog box for setting tabs.
TableFormatDialogInvokes the built-in dialog box for setting formatting attributes of tables.
TextFrameAttributesDialogInvokes the built-in dialog box for setting attributes of text frames.
UndoUndoes the last edit operation in the Text Control.

Events

EventDescription
AdaptFontOccurs for each font that must be adapted, because it is not supported.
ChangedIndicates that the contents of a document have been changed.
CharFormatChangedOccurs when the character formatting attributes either of the selected characters or the current text input position have been changed.
DocumentLinkClickedOccurs when a text field has been clicked on that represents a link to a target in the document.
FormattingStyleListChangedOccurs after one or more formatting styles have been added or removed.
HeaderFooterActivatedOccurs when a header or footer has been activated.
HeaderFooterDeactivatedOccurs when a header or footer has been deactivated.
HExpandedOccurs when the Text Control has automatically expanded its size horizontally. The event handler receives an argument of type EventArgs containing data related to this event.
HScrollOccurs when the horizontal scroll position has been changed.
HShrunkOccurs when the Text Control has automatically shrunk its size horizontally. The event handler receives an argument of type EventArgs containing data related to this event.
HypertextLinkClickedOccurs when a text field has been clicked on that represents the source of a hypertext link.
ImageClickedOccurs when an image has been clicked on.
ImageCreatedOccurs when a new image has been created.
ImageDeletedOccurs when an image has been deleted.
ImageDoubleClickedOccurs when an image has been doubleclicked on.
ImageMovedOccurs when an inserted image has been moved with the built-in mouse interface.
ImageRightClickedOccurs when an image has been clicked on with the right mouse button.
ImageSizedOccurs when an inserted image has been sized with the built-in mouse interface.
InputFormattingStyleChangedOccurs after the text input position has been moved to a text part formatted with another style.
InputParagraphChangedOccurs when the text input position has been moved to another paragraph.
InputPositionChangedOccurs when the text input position has been changed.
PageChangedOccurs when the text input position has been moved to another page.
PageFormatChangedOccurs when the page format settings have been changed.
ParagraphFormatChangedOccurs when the formatting attributes of the selected paragraphs have been changed.
SectionChangedOccurs when the text input position has been moved to another section.
SpellCheckTextOccurs, if the document's text has been altered and the spelling of the new text must be checked.
TableCreatedOccurs after a table has been pasted from the clipboard or when a document is loaded containing tables.
TableDeletedOccurs after a table has been deleted.
TableFormatChangedOccurs when the design attributes of a selected table have been changed.
TextFieldChangedOccurs when the text of a text field has been changed.
TextFieldClickedOccurs when a text field has been clicked on.
TextFieldCreatedOccurs when a text field has been pasted from the clipboard.
TextFieldDeletedOccurs when a text field has been deleted.
TextFieldDoubleClickedOccurs when a text field has been double-clicked on.
TextFieldEnteredOccurs when the current input position has been moved to a position that belongs to a text field.
TextFieldLeftOccurs when the current input position has left a text field.
TextFrameActivatedOccurs when a text frame has been activated.
TextFrameClickedOccurs when a text frame has been clicked on.
TextFrameCreatedOccurs when a new text frame has been created.
TextFrameDeactivatedOccurs when a text frame has been deactivated.
TextFrameDeletedOccurs when a text frame has been deleted.
TextFrameDoubleClickedOccurs when a text frame has been doubleclicked on.
TextFrameMovedOccurs when a text frame has been moved with the built-in mouse interface.
TextFrameRightClickedOccurs when a text frame has been clicked on with the right mouse button.
TextFrameSizedOccurs when a text frame has been sized with the built-in mouse interface.
VExpandedOccurs when the Text Control has automatically expanded its size vertically.
VScrollOccurs when the vertical scroll position has been changed.
VShrunkOccurs when the Text Control has automatically shrunk its size vertically.
XmlInvalidOccurs when a loaded or changed XML document cannot be validated with the document type definition (DTD) referenced in the document.
XmlNotWellFormedOccurs when a loaded XML document is not well-formed.
 
 
 

Products

Support

Downloads

Corporate

Buy Now