Back to Devexpress

ContentControlCollection.Remove(ContentControlBase, Boolean) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-contentcontrolcollection-dot-remove-x28-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-contentcontrolbase-system-dot-boolean-x29.md

latest3.7 KB
Original Source

ContentControlCollection.Remove(ContentControlBase, Boolean) Method

Removes the specific content control from the collection. Allows you to specify whether to keep the content control contents.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
void Remove(
    ContentControlBase control,
    bool isRemoveContent
)
vb
Sub Remove(
    control As ContentControlBase,
    isRemoveContent As Boolean
)

Parameters

NameTypeDescription
controlContentControlBase

The content control that should be removed.

| | isRemoveContent | Boolean |

true, to remove control’s contents; otherwise, false.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Remove(ContentControlBase, Boolean) method.

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.

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/ContentControlActions.cs#L82

csharp
{
    contentControls.Remove(contentControls[i], true);
}

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/ContentControls.cs#L83

csharp
{
    contentControls.Remove(contentControls[i], true);
}

word-document-api-examples/CS/CodeExamples/ContentControlsActions.cs#L83

csharp
if (contentControls[i].ControlType == ContentControlType.Date) {
    contentControls.Remove(contentControls[i], true);
}

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/ContentControls.vb#L65

vb
If contentControls(CInt((i))).ControlType = DevExpress.XtraRichEdit.API.Native.ContentControlType.[Date] Then
    contentControls.Remove(contentControls(i), True)
End If

See Also

ContentControlCollection Interface

ContentControlCollection Members

DevExpress.XtraRichEdit.API.Native Namespace