TX Text Control .NET Server

FileName Property

Property
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

Gets or sets the corresponding file name and path from which an inserted image is loaded.

Syntax

public string FileName { get; set; }

Examples

The following example inserts and configures a named, accessible company logo by using Image.FileName.

TXTextControl.Image image = new() { FileName = @"Images\company-logo.png", Name = "CompanyLogo" };
textControl.Images.Add(image, -1);

image.FileName = @"Images\company-logo.png";
if (!string.IsNullOrWhiteSpace(image.FileName))
{
    Console.WriteLine($"File Name: {image.FileName}");
}

textControl.Save("report-with-logo.docx", StreamType.WordprocessingML);