officefileapi-devexpress-dot-xtrarichedit-dot-trackedmovesconflicteventargs.md
Gets or sets what version of moved text to keep.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
public TrackedMovesConflictResolveMode ResolveMode { get; set; }
Public Property ResolveMode As TrackedMovesConflictResolveMode
| Type | Description |
|---|---|
| TrackedMovesConflictResolveMode |
One of the TrackedMovesConflictResolveMode enumeration values indication the resolve mode.
|
Available values:
| Name | Description |
|---|---|
| KeepOriginalLocationText |
Keep text from the original location.
| | KeepNewLocationText |
Keep text from the new location.
|
Use the ResolveMode property to specify the version of moved text 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;
}
Private Sub WordProcessor_TrackedMovesConflict(ByVal sender As Object, ByVal e As TrackedMovesConflictEventArgs)
'Compare the length of the original and new location ranges
'Keep text from the location whose range is the smallest
e.ResolveMode = If((e.OriginalLocationRange.Length <= e.NewLocationRange.Length), TrackedMovesConflictResolveMode.KeepOriginalLocationText, TrackedMovesConflictResolveMode.KeepNewLocationText)
End Sub
The following code snippets (auto-collected from DevExpress Examples) contain references to the ResolveMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
word-document-api-use-track-changes/CS/Program.cs#L66
//Keep text from the location whose range is the smallest
e.ResolveMode = (e.OriginalLocationRange.Length <= e.NewLocationRange.Length) ? TrackedMovesConflictResolveMode.KeepOriginalLocationText : TrackedMovesConflictResolveMode.KeepNewLocationText;
}
winforms-rich-edit-manage-tracked-changes/CS/XtraRichEdit_TrackChanges/Form1.cs#L88
//Keep text from the location whose range is the smallest
e.ResolveMode = (e.OriginalLocationRange.Length <= e.NewLocationRange.Length) ? TrackedMovesConflictResolveMode.KeepOriginalLocationText : TrackedMovesConflictResolveMode.KeepNewLocationText;
}
wpf-richedit-manage-tracked-changes/CS/DXRichEdit_TrackChanges/MainWindow.xaml.cs#L49
//Keep text from the location whose range is the smallest
e.ResolveMode = (e.OriginalLocationRange.Length <= e.NewLocationRange.Length) ? TrackedMovesConflictResolveMode.KeepOriginalLocationText : TrackedMovesConflictResolveMode.KeepNewLocationText;
}
word-document-api-use-track-changes/VB/Program.vb#L60
'Keep text from the location whose range is the smallest
e.ResolveMode = If(e.OriginalLocationRange.Length <= e.NewLocationRange.Length, TrackedMovesConflictResolveMode.KeepOriginalLocationText, TrackedMovesConflictResolveMode.KeepNewLocationText)
End Sub
winforms-rich-edit-manage-tracked-changes/VB/XtraRichEdit_TrackChanges/Form1.vb#L71
'Keep text from the location whose range is the smallest
e.ResolveMode = If(e.OriginalLocationRange.Length <= e.NewLocationRange.Length, TrackedMovesConflictResolveMode.KeepOriginalLocationText, TrackedMovesConflictResolveMode.KeepNewLocationText)
End Sub
wpf-richedit-manage-tracked-changes/VB/DXRichEdit_TrackChanges/MainWindow.xaml.vb#L41
'Keep text from the location whose range is the smallest
e.ResolveMode = If(e.OriginalLocationRange.Length <= e.NewLocationRange.Length, TrackedMovesConflictResolveMode.KeepOriginalLocationText, TrackedMovesConflictResolveMode.KeepNewLocationText)
End Sub
See Also
TrackedMovesConflictEventArgs Class