This documentation is archived and is not being maintained.

TextPattern.HorizontalTextAlignmentAttribute Field

Identifies the HorizontalTextAlignment attribute of a text range.

Namespace: System.Windows.Automation
Assembly: UIAutomationClient (in uiautomationclient.dll)

public:
static initonly AutomationTextAttribute^ HorizontalTextAlignmentAttribute
public static final AutomationTextAttribute HorizontalTextAlignmentAttribute
public static final var HorizontalTextAlignmentAttribute : AutomationTextAttribute
Not applicable.

This attribute represents the horizontal text alignment applied to the paragraph(s) associated with the calling text range.

This identifier is used by UI Automation client applications. UI Automation providers should use the equivalent field in TextPatternIdentifiers.

UI Automation clients get the value of the attribute by calling GetAttributeValue.

Values for this attribute are of type

HorizontalTextAlignment. The default value is Left

The following example shows how to obtain an attribute value for a range of text in Microsoft Notepad.

NoteNote:

Microsoft Notepad is used as the text provider for example purposes only. Microsoft Notepad is not guaranteed to support the attribute value being requested.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: