Remove Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Removes a frame (image, text frame, chart, barcode or drawing) from a document.
Syntax
public bool Remove(FrameBase frame);Public Function Remove(frame As FrameBase) As BooleanParameters
| Parameter | Description |
|---|---|
| frame | Specifies the image, text frame, chart, barcode or drawing to remove. |
Return Value
The return value is true, if the frame could be removed. Otherwise, it is false.
Examples
The following example works with frames in the current document by using FrameCollection.Remove.
FrameCollection frameCollection = textControl.Frames;
TextFrame callout = new(new System.Drawing.Size(3000, 1200)) { Name = "Callout" };
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText);
if (frameCollection.Remove(new TXTextControl.Image()))
{
Console.WriteLine("Remove completed successfully.");
}Dim frameCollection As FrameCollection = textControl.Frames
Dim callout As New TextFrame(New System.Drawing.Size(3000, 1200)) With { .Name = "Callout" }
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText)
If frameCollection.Remove(New TXTextControl.Image()) Then
Console.WriteLine("Remove completed successfully.")
End If