TX Text Control .NET for WPF

HorizontalScrollBarVisibility Property

Property|Introduced in 16.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets a value that indicates whether a horizontal scroll bar is shown. The property's value is of the type System.Windows.Controls.ScrollBarVisibility. This is a dependency property.

Syntax

public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }

Members

ValueDescription
AutoA horizontal scroll bar is shown when the document is not completely visible in the horizontal direction.
DisabledA horizontal scroll bar is not shown even if the document is not completely visible.
HiddenSame as Disabled.
VisibleSame as Auto.

Examples

The following example uses TextControl.HorizontalScrollBarVisibility to configure horizontal scroll bar visibility as part of the text control workflow. The configured value is checked before the workflow continues.

textControl.HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Disabled;
Console.WriteLine($"Horizontal Scroll Bar Visibility used by Text Control: {textControl.HorizontalScrollBarVisibility}");