TextPattern 类

定义

表示包含文本的控件。

public ref class TextPattern : System::Windows::Automation::BasePattern
public class TextPattern : System.Windows.Automation.BasePattern
type TextPattern = class
    inherit BasePattern
Public Class TextPattern
Inherits BasePattern
继承
TextPattern

注解

TextPattern 类可能不提供仅在特定UI 自动化提供程序中存在的文本功能。 对于这些独特且通常高级的功能,AutomationElement 类为UI 自动化客户端提供访问相应本机对象模型的方法。

字段

名称 说明
AnimationStyleAttribute

AnimationStyle标识文本范围的属性。

BackgroundColorAttribute

标识文本范围的 BackgroundColor 属性。

BulletStyleAttribute

BulletStyle标识文本范围的属性。

CapStyleAttribute

CapStyle标识文本范围的属性。

CultureAttribute

Culture 标识文本范围的 (CultureInfo) 属性,归到子语言级别;例如,French-Switzerland(fr-CH)而不是法语(fr)。

FontNameAttribute

FontName标识文本范围的属性。

FontSizeAttribute

FontSize标识文本范围的属性。

FontWeightAttribute

FontWeight标识文本范围的属性。

ForegroundColorAttribute

标识 ForegroundColor 文本范围的 (COLORREF) 属性。

HorizontalTextAlignmentAttribute

HorizontalTextAlignment标识文本范围的属性。

IndentationFirstLineAttribute

标识 IndentationFirstLine 文本范围的 (TextIndent) 属性。

IndentationLeadingAttribute

标识 IndentationLeading文本范围的 (TextIndent) 属性。

IndentationTrailingAttribute

标识 IndentationTrailing文本范围的 (TextIndent) 属性。

IsHiddenAttribute

IsHidden标识文本范围的属性。

IsItalicAttribute

标识 IsItalic 文本范围的 (FontStyle) 属性。

IsReadOnlyAttribute

IsReadOnly标识文本范围的属性。

IsSubscriptAttribute

标识 IsSubscript 文本范围的 (FontVariants) 属性。

IsSuperscriptAttribute

标识 IsSuperscript 文本范围的 (FontVariants) 属性。

MarginBottomAttribute

标识 MarginBottom 文本范围的 (PageSettings) 属性。

MarginLeadingAttribute

标识 MarginLeading 文本范围的 (PageSettings) 属性。

MarginTopAttribute

标识 MarginTop 文本范围的 (PageSettings) 属性。

MarginTrailingAttribute

标识 MarginTrailing 文本范围的 (PageSettings) 属性。

MixedAttributeValue

标识给定属性的值是否因丰富编辑控件中的文本范围而异。

OutlineStylesAttribute

标识 OutlineStyles 文本范围的 (OutlineStyles) 属性。

OverlineColorAttribute

OverlineColor标识文本范围的属性。

OverlineStyleAttribute

标识 OverlineStyle 文本范围的 (TextDecorationLineStyle) 属性。

Pattern

标识 TextPattern 模式。

StrikethroughColorAttribute

StrikethroughColor标识文本范围的属性。

StrikethroughStyleAttribute

标识 StrikethroughStyle 文本范围的 (TextDecorationLineStyle) 属性。

TabsAttribute

Tabs标识文本范围的属性。

TextChangedEvent

标识每当修改文本内容时引发的事件。

TextFlowDirectionsAttribute

标识 TextFlowDirections 文本范围的 (FlowDirections) 属性。

TextSelectionChangedEvent

标识修改文本选择时引发的事件。

UnderlineColorAttribute

UnderlineColor标识文本范围的属性。

UnderlineStyleAttribute

标识 UnderlineStyle 文本范围的 (TextDecorationLineStyle) 属性。

属性

名称 说明
DocumentRange

获取包含文档主文本的文本范围。

SupportedTextSelection

获取一个值,该值指定文本提供程序是否支持选择,如果是,则支持所选内容的类型。

方法

名称 说明
Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetSelection()

检索与当前文本选择或所选内容关联的不连续文本范围的集合。

GetType()

获取当前实例的 Type

(继承自 Object)
GetVisibleRanges()

从文本容器中检索一组不连续的文本范围,其中每个文本范围从第一个部分可见的行开始到最后一个部分可见行的末尾。

MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
RangeFromChild(AutomationElement)

检索包含子元素(如图像、超链接、Microsoft Excel 电子表格或其他嵌入对象)的文本范围。

RangeFromPoint(Point)

返回离指定屏幕坐标最近的退化(空)文本范围。

ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅