The event handler receives an argument of type TrackedMovesConflictEventArgs containing data related to this event.
The following
TrackedMovesConflictEventArgs 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 (see DevExpress.XtraRichEdit.TrackedMovesConflictEventArgs.OriginalLocationRange) and DevExpress.XtraRichEdit.TrackedMovesConflictEventArgs.NewLocationRange properties), and the revision whose rejection fired this event (the DevExpress.XtraRichEdit.TrackedMovesConflictEventArgs.Revision property). Use the ResolveMode (see DevExpress.XtraRichEdit.TrackedMovesConflictEventArgs.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:
C# |
private void WordProcessor_TrackedMovesConflict(object sender, TrackedMovesConflictEventArgs e)
{
e.ResolveMode = (e.OriginalLocationRange.Length <= e.NewLocationRange.Length) ? TrackedMovesConflictResolveMode.KeepOriginalLocationText : TrackedMovesConflictResolveMode.KeepNewLocationText;
}
|
VB |
Private Sub WordProcessor_TrackedMovesConflict(ByVal sender As Object, ByVal e As TrackedMovesConflictEventArgs)
e.ResolveMode = If((e.OriginalLocationRange.Length <= e.NewLocationRange.Length), TrackedMovesConflictResolveMode.KeepOriginalLocationText, TrackedMovesConflictResolveMode.KeepNewLocationText)
End Sub
|