Skip to main content

RichEditControl.TrackedMovesConflict Event

Occurs when moved text has been changed since it was moved.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v22.2.dll

NuGet Package: DevExpress.Win.RichEdit


public event TrackedMovesConflictEventHandler TrackedMovesConflict

Event Data

The TrackedMovesConflict event's data class is TrackedMovesConflictEventArgs. The following properties provide information specific to this event:

Property Description
NewLocationRange Provides access to the range of the moved text’s new location.
OriginalLocationRange Retrieves the range of the moved text’s original location.
ResolveMode Gets or sets what version of moved text to keep.
Revision Provides access to the revision whose rejection fired the event.


Handle this event to resolve the conflict when the moved text has been changed (i.e., new text has been inserted) since it was moved, and the move was rejected.

The event does not occur if new revision in the moved text was rejected.

You can obtain the original and new location range (OriginalLocationRange and NewLocationRange properties), and the revision whose rejection fired this event (the Revision property). Use the ResolveMode property to specify the version you want to keep.

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