GetAttributeValue Method

ITextRangeProvider.GetAttributeValue Method (Int32)


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

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

object GetAttributeValue(
	int attribute


Type: System.Int32

The text attribute.

Return Value

Type: System.Object

Retrieves an object representing the value of the specified attribute. For example, GetAttributeValue(TextPattern.FontNameAttribute) would return a string that represents the font name of the text range while GetAttributeValue(TextPattern.IsItalicAttribute) would return a value of type Boolean.

Returns MixedAttributeValue if the value of the specified attribute varies over the text range.

Returns NotSupported if the specified attribute is not supported by the provider or the control.

Exception Condition

If the specified attribute is not valid.

There is no differentiation between hidden and visible text.

.NET Framework
Available since 3.0
Available since 4.0
Windows Phone Silverlight
Available since 7.1
Return to top
© 2015 Microsoft