TextPattern 类

定义

表示包含文本的控件。Represents controls that contain text.

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 自动化提供程序中的文本功能。The TextPattern class may not provide for text features that exist only in a particular UI Automation provider. 对于这些唯一的和通常的高级功能AutomationElement , 类为 UI 自动化客户端提供访问相应本机对象模型的方法。For these unique and often advanced features, the AutomationElement class provides methods for a UI Automation client to access the corresponding native object model.

字段

AnimationStyleAttribute

标识文本范围的 AnimationStyle 特性。Identifies the AnimationStyle attribute of a text range.

BackgroundColorAttribute

标识文本范围的 BackgroundColor 属性。Identifies the BackgroundColor attribute of a text range.

BulletStyleAttribute

标识文本范围的 BulletStyle 特性。Identifies the BulletStyle attribute of a text range.

CapStyleAttribute

标识文本范围的 CapStyle 特性。Identifies the CapStyle attribute of a text range.

CultureAttribute

标识细化到子语言级别的文本范围的 Culture (CultureInfo) 特性;例如,瑞士法语 (fr-CH),而不是法语 (fr)。Identifies the Culture (CultureInfo) attribute of a text range down to the sub-language level; for example, French-Switzerland (fr-CH) instead of French (fr).

FontNameAttribute

标识文本范围的 FontName 特性。Identifies the FontName attribute of a text range.

FontSizeAttribute

标识文本范围的 FontSize 特性。Identifies the FontSize attribute of a text range.

FontWeightAttribute

标识文本范围的 FontWeight 特性。Identifies the FontWeight attribute of a text range.

ForegroundColorAttribute

标识文本范围的 ForegroundColor (COLORREF) 属性。Identifies the ForegroundColor (COLORREF) attribute of a text range.

HorizontalTextAlignmentAttribute

标识文本范围的 HorizontalTextAlignment 特性。Identifies the HorizontalTextAlignment attribute of a text range.

IndentationFirstLineAttribute

标识文本范围的 IndentationFirstLine (TextIndent) 特性。Identifies the IndentationFirstLine (TextIndent) attribute of a text range.

IndentationLeadingAttribute

标识文本范围的 IndentationLeading (TextIndent) 特性。Identifies the IndentationLeading(TextIndent) attribute of a text range.

IndentationTrailingAttribute

标识文本范围的 IndentationTrailing (TextIndent) 特性。Identifies the IndentationTrailing(TextIndent) attribute of a text range.

IsHiddenAttribute

标识文本范围的 IsHidden 特性。Identifies the IsHidden attribute of a text range.

IsItalicAttribute

标识文本范围的 IsItalic (FontStyle) 特性。Identifies the IsItalic (FontStyle) attribute of a text range.

IsReadOnlyAttribute

标识文本范围的 IsReadOnly 特性。Identifies the IsReadOnly attribute of a text range.

IsSubscriptAttribute

标识文本范围的 IsSubscript (FontVariants) 特性。Identifies the IsSubscript (FontVariants) attribute of a text range.

IsSuperscriptAttribute

标识文本范围的 IsSuperscript (FontVariants) 特性。Identifies the IsSuperscript (FontVariants) attribute of a text range.

MarginBottomAttribute

标识文本范围的 MarginBottom (PageSettings) 特性。Identifies the MarginBottom (PageSettings) attribute of a text range.

MarginLeadingAttribute

标识文本范围的 MarginLeading (PageSettings) 特性。Identifies the MarginLeading (PageSettings) attribute of a text range.

MarginTopAttribute

标识文本范围的 MarginTop (PageSettings) 特性。Identifies the MarginTop (PageSettings) attribute of a text range.

MarginTrailingAttribute

标识文本范围的 MarginTrailing (PageSettings) 特性。Identifies the MarginTrailing (PageSettings) attribute of a text range.

MixedAttributeValue

标识给定特性的值是否在 Rich Edit 控件中的某个文本范围内发生变化。Identifies whether the value of a given attribute varies over a text range in a rich edit control.

OutlineStylesAttribute

标识文本范围的 OutlineStyles (OutlineStyles) 特性。Identifies the OutlineStyles (OutlineStyles) attribute of a text range.

OverlineColorAttribute

标识文本范围的 OverlineColor 特性。Identifies the OverlineColor attribute of a text range.

OverlineStyleAttribute

标识文本范围的 OverlineStyle (TextDecorationLineStyle) 特性。Identifies the OverlineStyle (TextDecorationLineStyle) attribute of a text range.

Pattern

标识 TextPattern 模式。Identifies the TextPattern pattern.

StrikethroughColorAttribute

标识文本范围的 StrikethroughColor 特性。Identifies the StrikethroughColor attribute of a text range.

StrikethroughStyleAttribute

标识文本范围的 StrikethroughStyle (TextDecorationLineStyle) 特性。Identifies the StrikethroughStyle (TextDecorationLineStyle) attribute of a text range.

TabsAttribute

标识文本范围的 Tabs 特性。Identifies the Tabs attribute of a text range.

TextChangedEvent

标识每当修改文本内容时引发的事件。Identifies the event raised whenever textual content is modified.

TextFlowDirectionsAttribute

标识文本范围的 TextFlowDirections (FlowDirections) 特性。Identifies the TextFlowDirections (FlowDirections) attribute of a text range.

TextSelectionChangedEvent

标识在修改文本选择时引发的事件。Identifies the event raised when the text selection is modified.

UnderlineColorAttribute

标识文本范围的 UnderlineColor 特性。Identifies the UnderlineColor attribute of a text range.

UnderlineStyleAttribute

标识文本范围的 UnderlineStyle (TextDecorationLineStyle) 特性。Identifies the UnderlineStyle (TextDecorationLineStyle) attribute of a text range.

属性

DocumentRange

获取包含文档主文本的文本范围。Gets a text range that encloses the main text of a document.

SupportedTextSelection

获取一个指定文本提供程序是否支持文本选择的值,并在支持文本选择的情况下获取所支持的选择的类型。Gets a value that specifies whether a text provider supports selection and, if so, the type of selection supported.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetSelection()

检索与当前文本选择(或多个文本选择)关联的不连续文本范围的集合。Retrieves a collection of disjoint text ranges associated with the current text selection or selections.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetVisibleRanges()

从文本容器中检索一个不连续文本范围的数组,其中每个文本范围都以第一个部分可见的行开始,以最后一个部分可见的行结束。Retrieves an array of disjoint text ranges from a text container where each text range begins with the first partially visible line through to the end of the last partially visible line.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
RangeFromChild(AutomationElement)

检索包含子元素(例如图像、超链接、Microsoft ExcelMicrosoft Excel 电子表格或其他嵌入对象)的一个文本范围。Retrieves a text range enclosing a child element such as an image, hyperlink, Microsoft ExcelMicrosoft Excel spreadsheet, or other embedded object.

RangeFromPoint(Point)

返回与指定屏幕坐标最接近的退化(空)文本范围。Returns the degenerate (empty) text range nearest to the specified screen coordinates.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅