GetAttributeValue Method

ITextRangeProvider.GetAttributeValue Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Retrieves the value of the specified attribute ID across the text range.

Namespace:  System.Windows.Automation.Provider
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Function GetAttributeValue ( _
	attributeId As Integer _
) As Object

Parameters

attributeId
Type: System.Int32
The text attribute ID.

Return Value

Type: System.Object
Retrieves an object that represents the value of the specified attribute. See Remarks.

ExceptionCondition
ArgumentException

The specified attribute ID is not valid.

This method returns results where the returned value varies, depending on which attribute ID is requested. For example, GetAttributeValue(TextPattern.FontNameAttribute) returns a string that represents the font name of the text range, GetAttributeValue(TextPattern.IsItalicAttribute) returns a value of type Boolean, and so on.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft