TX Text Control .NET Server

Remove Method

Method
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 an image from a Text Control document.

Syntax

public bool Remove(Image image);

Parameters

ParameterDescription
image

Specifies the image to remove.

Return Value

The return value is true, if the image could be removed. Otherwise, it is false.

Examples

The following example removes a document logo after locating it by name.

TXTextControl.Image logo = new() { FileName = @"Images\company-logo.png", Name = "CompanyLogo", DescriptiveText = "Company logo" };
textControl.Images.Add(logo, -1);
TXTextControl.Image image = textControl.Images.GetItem("CompanyLogo");
if (image != null)
{
    textControl.Images.Remove(image);
}