Share via


ITextRangeProvider.FindAttribute(Int32, Object, Boolean) 方法

定义

返回具有指定属性 ID 和属性值的文本范围子集。

public:
 ITextRangeProvider ^ FindAttribute(int attributeId, Platform::Object ^ value, bool backward);
ITextRangeProvider FindAttribute(int const& attributeId, IInspectable const& value, bool const& backward);
public ITextRangeProvider FindAttribute(int attributeId, object value, bool backward);
function findAttribute(attributeId, value, backward)
Public Function FindAttribute (attributeId As Integer, value As Object, backward As Boolean) As ITextRangeProvider

参数

attributeId
Int32

int

要搜索的属性 ID。

value
Object

Platform::Object

IInspectable

要搜索的特性值。 此值必须与为特性指定的类型匹配。

backward
Boolean

bool

如果应返回最后一个文本范围而不是第一个文本范围,则为 true;否则为 false

返回

具有匹配的属性 ID 和属性值的文本范围;否则 为 null

适用于