TX Text Control .NET for Windows Forms

ImageSavePath Property

Property
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Sets a file path that is used to save resources like images when images are saved as file link. If this location does not exists it is generated.

Syntax

public string ImageSavePath { get; set; }

Examples

The following example configures how the current document is exported to WordprocessingML by using SaveSettings.ImageSavePath.

textControl.Text = "Quarterly results";
SaveSettings saveSettings = new();

saveSettings.ImageSavePath = "document.docx";
if (!string.IsNullOrWhiteSpace(saveSettings.ImageSavePath))
{
    Console.WriteLine($"Image Save Path: {saveSettings.ImageSavePath}");
}

textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings);