Export (0) Print
Expand All

TextPatternRange Class

Represents a span of continuous text in a TextPattern container.

System.Object
  System.Windows.Automation.Text.TextPatternRange

Namespace:  System.Windows.Automation.Text
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

public class TextPatternRange

The TextPatternRange type exposes the following members.

  NameDescription
Public propertyTextPatternGets the TextPattern associated with the text range.
Top

  NameDescription
Public methodAddToSelectionAdds to the collection of highlighted text in a text container that supports multiple, disjoint selections.
Public methodCloneRetrieves a new TextPatternRange identical to the original TextPatternRange and inheriting all properties of the original.
Public methodCompareReturns a Boolean value indicating whether the span (the Start endpoint to the End endpoint) of a text range is the same as another text range.
Public methodCompareEndpointsReturns an Int32 indicating whether two text ranges have identical endpoints.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExpandToEnclosingUnitExpands the text range to the specified TextUnit.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFindAttributeReturns a text range subset that has the specified attribute value.
Public methodFindTextReturns a text range subset that contains the specified text.
Public methodGetAttributeValueReturns the value of the specified attribute across the entire text range.
Public methodGetBoundingRectanglesRetrieves a collection of bounding rectangles for each fully or partially visible line of text in a text range.
Public methodGetChildrenRetrieves a collection of all embedded objects that fall within the text range.
Public methodGetEnclosingElementReturns the innermost AutomationElement that encloses the text range.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTextReturns the plain text of the text range.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodMoveMoves the text range the specified number of text units.
Public methodMoveEndpointByRangeMoves one endpoint of a text range to the specified endpoint of a second text range.
Public methodMoveEndpointByUnitMoves one endpoint of the text range the specified number of TextUnits within the document range.
Public methodRemoveFromSelectionRemoves a highlighted section of text, corresponding to the calling text range Start and End endpoints, from an existing collection of highlighted text in a text container that supports multiple, disjoint selections.
Public methodScrollIntoViewCauses the text control to scroll vertically until the text range is visible in the viewport.
Public methodSelectHighlights text in the text control corresponding to the text range Start and End endpoints.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

A TextPatternRange can represent an insertion point, a subset, or all of the text in a TextPattern container.

A TextPatternRange will become invalid if one of the following occurs: the text in the TextPattern container changes because of some user activity, or the SetValue method of ValuePattern is used to programmatically change the value of the text in the TextPattern container.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft