TX Text Control .NET for Windows Forms

DocumentBasePath Property

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

Description

Gets or sets a file path that is used to search for resources like images or hypertext links. This path is added to all relative file paths used in the document.

Syntax

public string DocumentBasePath { get; set; }

Examples

The following example configures document settings for the current document by using DocumentSettings.DocumentBasePath.

DocumentSettings documentSettings = textControl.DocumentSettings;

documentSettings.DocumentBasePath = "document.docx";
if (!string.IsNullOrWhiteSpace(documentSettings.DocumentBasePath))
{
    Console.WriteLine($"Document Base Path: {documentSettings.DocumentBasePath}");
}

documentSettings.DocumentTitle = "Quarterly results";
documentSettings.Author = "Finance team";