TX Text Control .NET for Windows Forms

HorizontalContentAlignment Property

Property|Introduced in 27.0
Namespace
TXTextControl.Windows.Forms.Ribbon
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the ribbon group's horizontal content alignment. The default value is TXTextControl.HorizontalAlignment.Left.

Syntax

public HorizontalAlignment HorizontalContentAlignment { get; set; }

Members

ValueDescription
LeftThe content is left aligned.
RightThe content is right aligned.
CenterThe content is centered.
JustifyThis value cannot be used with this property.

Examples

The following example uses RibbonGroup.HorizontalContentAlignment to configure horizontal content alignment as part of the ribbon group workflow. The change is then applied to the active document or user interface.

ribbonGroup.HorizontalContentAlignment = TXTextControl.HorizontalAlignment.Center;
ribbonGroup.Update();