TX Text Control .NET for Windows Forms

ImageSearchPath 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 search for resources like images or hypertext links. This path replaces all absolute file paths used in the document.

Syntax

public string ImageSearchPath { get; set; }

Examples

The following example configures how a WordprocessingML template is loaded by using LoadSettings.ImageSearchPath.

LoadSettings loadSettings = new();

loadSettings.ImageSearchPath = "document.docx";
if (!string.IsNullOrWhiteSpace(loadSettings.ImageSearchPath))
{
    Console.WriteLine($"Image Search Path: {loadSettings.ImageSearchPath}");
}

textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings);