CreateAnchor() public method

public CreateAnchor ( int offset ) : TextAnchor
offset int
return TextAnchor
示例#1
0
 /// <summary>
 ///     Creates a new <see cref="TextAnchor" /> at the specified offset.
 /// </summary>
 /// <inheritdoc cref="TextAnchor" select="remarks|example" />
 public TextAnchor CreateAnchor(int offset)
 {
     VerifyAccess();
     if (offset < 0 || offset > rope.Length)
     {
         throw new ArgumentOutOfRangeException("offset", offset,
                                               "0 <= offset <= " + rope.Length.ToString(CultureInfo.InvariantCulture));
     }
     return(anchorTree.CreateAnchor(offset));
 }