Skip to main content

TrackedMovesConflictEventArgs.OriginalLocationRange Property

Retrieves the range of the moved text’s original location.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

public DocumentRange OriginalLocationRange { get; }

Property Value

Type Description
DocumentRange

A DocumentRange object that is original location’s range.

Remarks

The TrackedMovesConflictEventArgs.NewLocationRange property provides access to the range of the moved text’s new location.

The code sample below shows how to handle the TrackedMovesConflict event to keep original text:

private void WordProcessor_TrackedMovesConflict(object sender, TrackedMovesConflictEventArgs e)
{
  //Compare the length of the original and new location ranges
  //Keep text from the location whose range is the smallest
  e.ResolveMode = (e.OriginalLocationRange.Length <= e.NewLocationRange.Length) ? TrackedMovesConflictResolveMode.KeepOriginalLocationText : TrackedMovesConflictResolveMode.KeepNewLocationText;
}
See Also