TX Text Control .NET Server

Remove Method

Method|Introduced in 18.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Removes a frame (image, text frame, chart, barcode or drawing) from a document.

Syntax

public bool Remove(FrameBase frame);

Parameters

ParameterDescription
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.");
}