officefileapi-devexpress-dot-xtrarichedit-dot-trackedmovesconflicteventargs-5df9e477.md
Provides access to the range of the moved text’s new location.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
public DocumentRange NewLocationRange { get; }
Public ReadOnly Property NewLocationRange As DocumentRange
| Type | Description |
|---|---|
| DocumentRange |
A DocumentRange object that is new location’s range.
|
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;
}
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
See Also
TrackedMovesConflictEventArgs Class