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)

Syntax

Function GetAttributeValue ( _
    attributeId As Integer _
) As Object
Object GetAttributeValue(
    int attributeId
)

Parameters

Return Value

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

Exceptions

Exception Condition
ArgumentException

The specified attribute ID is not valid.

Remarks

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.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

ITextRangeProvider Interface

System.Windows.Automation.Provider Namespace