FileName Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the corresponding file name and path from which an inserted image is loaded.
Syntax
public string FileName { get; set; }Public Property FileName As StringExamples
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);Dim image As New TXTextControl.Image() With { .FileName = "Images\company-logo.png", .Name = "CompanyLogo" }
textControl.Images.Add(image, -1)
image.FileName = "Images\company-logo.png"
If Not String.IsNullOrWhiteSpace(image.FileName) Then
Console.WriteLine($"File Name: {image.FileName}")
End If
textControl.Save("report-with-logo.docx", StreamType.WordprocessingML)