ITextRangeProvider.GetAttributeValue Method
[ 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.
Assembly: System.Windows (in System.Windows.dll)
Parameters
- attributeId
- Type: System.Int32
The text attribute ID.
Return Value
Type: System.ObjectRetrieves an object that represents the value of the specified attribute. See Remarks.
| Exception | Condition |
|---|---|
| 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.