Example #1
0
 void CreateAnchor()
 {
     if (document != null)
     {
         LineSegment line = document.GetLineSegment(Math.Max(0, Math.Min(location.Line, document.TotalNumberOfLines - 1)));
         anchor = line.CreateAnchor(Math.Max(0, Math.Min(location.Column, line.Length)));
         anchor.MovementType = AnchorMovementType.AfterInsertion;
         anchor.Deleted     += AnchorDeleted;
     }
 }