TX Text Control .NET Server

ViewMode Property

Property|Introduced in 26.0
Namespace
TXTextControl.ServerVisualisation
Type
TXTextControl.ServerVisualisation.TextViewGenerator
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Gets or sets the mode how a document is displayed.

Syntax

public ViewMode ViewMode { get; set; }

Members

ValueDescription
FloatingTextThe Text Control has a vertical scrollbar to enable unlimited text content. The maximum horizontal text extent is the horizontal size of the control. The values of the PageSize and PageMargins properties are ignored. Headers and footers are not displayed.
NormalThe Text Control has scrollbars and text is formatted according to the settings of the PageSize and the PageMargins properties. Headers and footers can be inserted but they are not displayed.
PageViewText is formatted like in Normal view mode, and additionally the Text Control displays the pages in 3D view with gaps and a desktop background. Headers and footers are displayed in WYSIWYG mode.
SimpleControlText is formatted according to the horizontal and vertical extent of the control. If the control is 'full', no further text can be inserted.

Examples

The following example applies bold formatting through the text view generator's selection by using TextViewGenerator.servervisualization-viewmode.

Selection formattedSelection = textViewGenerator.Selection;
formattedSelection.Bold = true;
textViewGenerator.Selection = formattedSelection;

textViewGenerator.ViewMode = ViewMode.PageView;
Console.WriteLine($"View Mode used by Text View Generator: {textViewGenerator.ViewMode}");

Further Reading

  • Setting the BackgroundImage of TX Text Control –