CssSaveMode Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
HTML only. Specifies how to save stylesheet data with a HTML document.
Syntax
public CssSaveMode CssSaveMode { get; set; }Public Property CssSaveMode As CssSaveModeMembers
| Value | Description |
|---|---|
| None | All format information is saved in the body of the HTML document through HTML tags. |
| Inline | Stylesheets are saved in the head of the HTML document. |
| CreateFile | Stylesheets are saved in a newly created CSS file. This file has the same name and location as the corresponding HTML file or is specified through the SaveSettings.CssFileName property. The file is only created if it does not exist. If the HTML document is saved in a memory buffer, this setting cannot be used. |
| OverwriteFile | Stylesheets are saved in a newly created CSS file. This file has the same name and location as the corresponding HTML file or is specified through the SaveSettings.CssFileName property. If the file already exists, it is overridden. If the HTML document is saved in a memory buffer, this setting cannot be used. |
Examples
The following example configures how the current document is exported to WordprocessingML by using SaveSettings.CssSaveMode.
textControl.Text = "Quarterly results";
SaveSettings saveSettings = new();
saveSettings.CssSaveMode = CssSaveMode.CreateFile;
Console.WriteLine($"Css Save Mode used by Save Settings: {saveSettings.CssSaveMode}");
textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings);textControl.Text = "Quarterly results"
Dim saveSettings As New SaveSettings()
saveSettings.CssSaveMode = CssSaveMode.CreateFile
Console.WriteLine($"Css Save Mode used by Save Settings: {saveSettings.CssSaveMode}")
textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings)