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

例外狀況

如果指定的屬性無效。

備註

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

適用於