Remove Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Removes a tracked change from the collection. Depending on the accept parameter the change is either accepted or rejected. When a change is rejected, inserted text is removed and deleted text is reinserted.
Syntax
public bool Remove(TrackedChange trackedChange, bool accept);Public Function Remove(trackedChange As TrackedChange, accept As Boolean) As BooleanParameters
| Parameter | Description |
|---|---|
| trackedChange | Specifies the tracked change to remove. |
| accept | When this parameter is true, the change is accepted, otherwise, it is rejected. |
Return Value
The return value is true, if the change could be removed. Otherwise, it is false.
Examples
The following example accepts all revisions authored by the review team while safely avoiding mutation during enumeration.
TrackedChange[] approvedChanges = textControl.TrackedChanges
.Cast<TrackedChange>()
.Where(change => change.UserName == "Review Team")
.ToArray();
foreach (TrackedChange change in approvedChanges)
{
textControl.TrackedChanges.Remove(change, true);
}Dim approvedChanges = textControl.TrackedChanges.
Cast(Of TrackedChange)().
Where(Function(change) change.UserName = "Review Team").
ToArray()
For Each change As TrackedChange In approvedChanges
textControl.TrackedChanges.Remove(change, True)
Next