AddParagraph 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
Specifies whether or not a new paragraph is created before text is loaded. This property has only an effect, when a LoadSettings object is used with the Selection.Load method. By default a new paragraph is not created. When text is loaded into an existing paragraph the formatting attributes of the existing and the last loaded paragraph are merged. When this property is true, attributes are not merged and the newly created paragraph gets the attributes of the last loaded paragraph.
Syntax
public bool AddParagraph { get; set; }Public Property AddParagraph As BooleanExamples
The following example configures how a WordprocessingML template is loaded by using LoadSettings.AddParagraph.
LoadSettings loadSettings = new();
loadSettings.AddParagraph = true;
if (loadSettings.AddParagraph)
{
Console.WriteLine("Load Settings: Add Paragraph is enabled.");
}
textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings);Dim loadSettings As New LoadSettings()
loadSettings.AddParagraph = True
If loadSettings.AddParagraph Then
Console.WriteLine("Load Settings: Add Paragraph is enabled.")
End If
textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings)