Description Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Gets or sets an optional file description. It is null, if the file has no description.
Syntax
public string Description { get; set; }Public Property Description As StringExamples
The following example configures a PDF attachment before embedding it in a WordprocessingML document by using EmbeddedFile.Description.
EmbeddedFile embeddedFile = new("terms.pdf", @"Attachments\terms.pdf", "application/pdf");
embeddedFile.Description = "Contract terms and conditions";
if (!string.IsNullOrWhiteSpace(embeddedFile.Description))
{
Console.WriteLine($"Description: {embeddedFile.Description}");
}
SaveSettings saveSettings = new() { EmbeddedFiles = new[] { embeddedFile } };
textControl.Save("contract-with-attachment.docx", StreamType.WordprocessingML, saveSettings);Dim embeddedFile As New EmbeddedFile("terms.pdf", "Attachments\terms.pdf", "application/pdf")
embeddedFile.Description = "Contract terms and conditions"
If Not String.IsNullOrWhiteSpace(embeddedFile.Description) Then
Console.WriteLine($"Description: {embeddedFile.Description}")
End If
Dim saveSettings As New SaveSettings() With { .EmbeddedFiles = New EmbeddedFile() { embeddedFile } }
textControl.Save("contract-with-attachment.docx", StreamType.WordprocessingML, saveSettings)