The LoadSettings class provides properties for advanced settings and information during load operations. See the TextControl.Load method for more information.

Syntax

public sealed class LoadSettings
Public NotInheritable Class LoadSettings

Examples

The following example shows how to use the LoadSettings to get the filename and the read bytes of a loaded document.

TXTextControl.LoadSettings ls = new TXTextControl.LoadSettings();

if (textControl1.Load(TXTextControl.StreamType.All, ls) == System.Windows.Forms.DialogResult.OK)
{
    System.Windows.Forms.MessageBox.Show(ls.LoadedFile + " has been loaded. " + ls.BytesRead.ToString() + " bytes read.");
}
Dim ls As TXTextControl.LoadSettings = New TXTextControl.LoadSettings()

If TextControl1.Load(TXTextControl.StreamType.All, ls) = System.Windows.Forms.DialogResult.OK Then
    System.Windows.Forms.MessageBox.Show(ls.LoadedFile + " has been loaded. " + ls.BytesRead.ToString() + " bytes read.")
End If

Methods

Method Description
GetDocumentPartNames SpreadsheetML only.

Properties

Property Description
AddParagraph Specifies whether or not a new paragraph is created before text is loaded.
ApplicationFieldFormat Specifies the format of text fields which are imported.
ApplicationFieldTypeNames Specifies an array of strings containing the type names of fields which are to be imported.
Author Gets the document's author.
BytesRead Gets the number of bytes read during the load operation.
CreationDate Gets the document's creation date.
CreatorApplication Gets the application, which has created the document.
CssFileName Gets the path and filename of the CSS file belonging to a HTML or XML document.
DocumentAccessPermissions Specifies how a document can be accessed after it has been loaded.
DocumentBasePath Sets a file path that is used to search for resources like images or hypertext links.
DocumentKeywords Gets the document's keywords.
DocumentPartName SpreadsheetML only.
DocumentSubject Gets the document's subject string.
DocumentTitle Gets the document's title.
ImageSearchPath Sets a file path that is used to search for resources like images or hypertext links.
LastModificationDate Gets the date the document is last modified.
LoadDocumentBackColor Specifies whether or not the document background color is loaded.
LoadHypertextLinks Specifies whether or not hypertext links are loaded.
LoadImages Specifies whether or not images are loaded.
LoadSubTextParts DOCX, DOC and RTF Formats only: Specifies whether or not bookmarks which extend over several characters are converted to SubTextParts.
LoadedFile Gets the name and path of the file that has been loaded.
LoadedStreamType Gets the StreamType of the file that has been loaded.
MasterPassword Specifies the password when the document is restricted with access permissions.
PDFImportSettings Specifies how the document structure is generated when a PDF document is imported.
PageMargins Gets the margins of the loaded document's pages.
PageSize Gets the width and height of the loaded document's pages.
ReportingMergeBlockFormat Specifies how reporting merge blocks are handled when a document is loaded.
UserDefinedDocumentProperties Gets a dictionary with all user-defined document properties contained in the loaded document.
UserPassword Specifies the password for the user to open a password protected document.

Further Reading

Learn more about the TXTextControl.LoadSettings Class in the Text Control Blog: