Data Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets the file's data. It can be either a string or binary data given as an array of bytes.
Syntax
public object Data { get; }Public ReadOnly Property Data As ObjectExamples
The following example configures a PDF attachment before embedding it in a WordprocessingML document by using EmbeddedFile.Data.
EmbeddedFile embeddedFile = new("terms.pdf", @"Attachments\terms.pdf", "application/pdf");
Console.WriteLine($"Data: {embeddedFile.Data}");
Console.WriteLine("Embedded File is ready for use.");
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")
Console.WriteLine($"Data: {embeddedFile.Data}")
Console.WriteLine("Embedded File is ready for use.")
Dim saveSettings As New SaveSettings() With { .EmbeddedFiles = New EmbeddedFile() { embeddedFile } }
textControl.Save("contract-with-attachment.docx", StreamType.WordprocessingML, saveSettings)Limitations
Read only.