Compartilhar via


ContentControlBase.Delete(Boolean) Method

Definition

Deletes a dynamically created content control from the document and removes it from the ControlCollection in the document.

public:
 void Delete(bool deleteContent);
public void Delete (bool deleteContent);
abstract member Delete : bool -> unit
Public Sub Delete (deleteContent As Boolean)

Parameters

deleteContent
Boolean

true to delete the contents of the control; false to leave the contents of the control in the document.

Exceptions

The content control was added to the document at design time.

Remarks

This method should only be used to delete a content control that is created programmatically at run time. An exception is thrown if you call this method on a content control that is added to the document at design time.

Applies to