SurviveDeletion Property
AvalonEdit
SurviveDeletion Property
NamespacesICSharpCode.AvalonEdit.DocumentTextAnchorSurviveDeletion

Specifies whether the anchor survives deletion of the text containing it.

false: The anchor is deleted when the a selection that includes the anchor is deleted. true: The anchor is not deleted.

Declaration Syntax
C#Visual BasicVisual C++
public bool SurviveDeletion { get; set; }
Public Property SurviveDeletion As Boolean
	Get
	Set
public:
virtual property bool SurviveDeletion {
	bool get () sealed;
	void set (bool value) sealed;
}
Remarks

When a piece of text containing an anchor is removed, then that anchor will be deleted. First, the IsDeleted property is set to true on all deleted anchors, then the Deleted events are raised. You cannot retrieve the offset from an anchor that has been deleted.

This deletion behavior might be useful when using anchors for building a bookmark feature, but in other cases you want to still be able to use the anchor. For those cases, set SurviveDeletion = true.

Assembly: ICSharpCode.AvalonEdit (Module: ICSharpCode.AvalonEdit.dll) Version: 5.0.0.4238