TX Text Control .NET for Windows Forms

CssFileName Property

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

Description

HTML only. Sets the path and filename of a CSS file belonging to a HTML document.

Syntax

public string CssFileName { get; set; }

Examples

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

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

saveSettings.CssFileName = "document.docx";
if (!string.IsNullOrWhiteSpace(saveSettings.CssFileName))
{
    Console.WriteLine($"Css File Name: {saveSettings.CssFileName}");
}

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