Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TrackedMovesConflictEventArgs.NewLocationRange Property

Provides access to the range of the moved text’s new location.

Namespace: DevExpress.XtraRichEdit

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

NuGet Package: DevExpress.RichEdit.Core

#Declaration

public DocumentRange NewLocationRange { get; }

#Property Value

Type Description
DocumentRange

A DocumentRange object that is new location’s range.

#Remarks

The TrackedMovesConflictEventArgs.OriginalLocationRange property provides access to the range of the moved text’s original 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