Export (0) Print
Expand All

ITextRangeProvider.GetAttributeValue Method

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

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

Object GetAttributeValue(
	int attributeId
)

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.

This method returns MixedAttributeValue if the value of the specified attribute varies over the text range.

This method returns NotSupported if the specified attribute is not supported by the provider or the control.

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft