All docs
V20.1
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

RichEditControl.TrackedMovesConflict Event

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

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v20.1.dll

Declaration

public event TrackedMovesConflictEventHandler TrackedMovesConflict
Public Event TrackedMovesConflict As TrackedMovesConflictEventHandler

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.

Remarks

When you move text, change it, and then reject this move, a conflict occurs that fires Document.TrackedMovesConflict and RichEditControl.TrackedMovesConflict events. Handle one of the events to specify the version of the text you want to keep (the TrackedMovesConflictEventArgs.ResolveMode property).

Use the TrackedMovesConflictEventArgs.OriginalLocationRange and TrackedMovesConflictEventArgs.NewLocationRange properties to obtain the original and new location range, and the TrackedMovesConflictEventArgs.Revision property to retrieve the revision that fired this event.

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

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