Udostępnij za pośrednictwem


TextPointer.GetPositionAtOffset(Int32, LogicalDirection) Method

Definition

Returns a TextPointer to the position indicated by the specified offset, in symbols, from the beginning of the current TextPointer and in the specified direction.

public:
 virtual TextPointer ^ GetPositionAtOffset(int offset, LogicalDirection direction) = GetPositionAtOffset;
TextPointer GetPositionAtOffset(int const& offset, LogicalDirection const& direction);
public TextPointer GetPositionAtOffset(int offset, LogicalDirection direction);
function getPositionAtOffset(offset, direction)
Public Function GetPositionAtOffset (offset As Integer, direction As LogicalDirection) As TextPointer

Parameters

offset
Int32

int

An offset, in symbols, for which to calculate and return the position. If the offset is negative, the returned TextPointer precedes the current TextPointer; otherwise, it follows.

direction
LogicalDirection

One of the LogicalDirection values that specifies the logical direction of the returned TextPointer.

Returns

A TextPointer to the position indicated by the specified offset and in the direction specified by the direction parameter, or null if the offset extends past the end of the content.

Applies to