語言

ITextRangeProvider.GetAttributeValue(Int32) 方法

定義

檢索指定屬性在整個文字範圍內的值。

public:
 System::Object ^ GetAttributeValue(int attribute);
public object GetAttributeValue(int attribute);
abstract member GetAttributeValue : int -> obj
Public Function GetAttributeValue (attribute As Integer) As Object

參數

attribute
Int32

文字屬性。

傳回

擷取代表指定屬性值的物件。 例如, GetAttributeValue(TextPattern.FontNameAttribute) 會回傳代表文字範圍字型名稱的字串,而 GetAttributeValue(TextPattern.IsItalicAttribute) 則會回傳型別 Boolean為 的值。

若指定屬性的值在文字範圍內變化,則回傳 MixedAttributeValue 。

若指定屬性未被提供者或控制項支援,則回傳 NotSupported 。

例外狀況

如果指定的屬性不成立。

備註

隱藏文字與可見文字之間沒有區別。

適用於