DefaultStreamType Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Determines the default StreamType used in the file Open... and file Save As... dialogboxes.
Syntax
public StreamType DefaultStreamType { get; set; }Public Property DefaultStreamType As StreamTypeExamples
The following example treats documents without a detectable signature as WordprocessingML files. The configured base settings are then used by the appropriate load or save operation.
loadSaveSettingsBase.DefaultStreamType = StreamType.WordprocessingML;
if (loadSaveSettingsBase is LoadSettings loadSettings)
{
textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings);
}
else if (loadSaveSettingsBase is SaveSettings saveSettings)
{
textControl.Save("configured-document.docx", StreamType.WordprocessingML, saveSettings);
}loadSaveSettingsBase.DefaultStreamType = StreamType.WordprocessingML
If TypeOf loadSaveSettingsBase Is LoadSettings Then
textControl.Load("template.docx", StreamType.WordprocessingML, DirectCast(loadSaveSettingsBase, LoadSettings))
ElseIf TypeOf loadSaveSettingsBase Is SaveSettings Then
textControl.Save("configured-document.docx", StreamType.WordprocessingML, DirectCast(loadSaveSettingsBase, SaveSettings))
End If