SaveMode Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Determines whether the image is stored through its data or through its file reference. By default an image is stored through a file reference if a file reference exists. Otherwise, if the image has been pasted from the clipboard, it is stored with its complete binary data.
Syntax
public ImageSaveMode SaveMode { get; set; }Public Property SaveMode As ImageSaveModeMembers
| Value | Description |
|---|---|
| Auto | The image is saved as specified with the SaveSettings.ImageSaveMode property. |
| SaveAsData | The image is saved in a Text Control document with its complete binary data. |
| SaveAsFileReference | The image is saved in a Text Control document through a file reference. |
Examples
The following example inserts and configures a named, accessible company logo by using Image.SaveMode.
TXTextControl.Image image = new() { FileName = @"Images\company-logo.png", Name = "CompanyLogo" };
textControl.Images.Add(image, -1);
image.SaveMode = ImageSaveMode.Auto;
Console.WriteLine($"Save Mode used by Image: {image.SaveMode}");
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.SaveMode = ImageSaveMode.Auto
Console.WriteLine($"Save Mode used by Image: {image.SaveMode}")
textControl.Save("report-with-logo.docx", StreamType.WordprocessingML)