ParagraphStyle Constructor
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Creates a new instance of the ParagraphStyle class.
Syntax
ParagraphStyle(string)
Creates a new instance of the ParagraphStyle class based on the TextControl root style named [Normal].
public ParagraphStyle(string name);Public Sub New(name As String)| Parameter | Description |
|---|---|
| name | Specifies the new style's name. |
ParagraphStyle(string, string)
Creates a new instance of the ParagraphStyle class based on the specified base style.
public ParagraphStyle(string name, string baseStyle);Public Sub New(name As String, baseStyle As String)| Parameter | Description |
|---|---|
| name | Specifies the new style's name. |
| baseStyle | Specifies the name of the style the new style is based on. |
ParagraphStyle(ParagraphStyle)
Creates a new root style that has all attributes of the specified style.
public ParagraphStyle(ParagraphStyle style);Public Sub New(style As ParagraphStyle)| Parameter | Description |
|---|---|
| style | Is a style the attributes of which are used to initialize the new style. |
Examples
The following example creates and configures a reusable paragraph style for the document.
ParagraphStyle paragraphStyle = new("ReportHeading");
textControl.ParagraphStyles.Add(paragraphStyle);Dim paragraphStyle As New ParagraphStyle("ReportHeading")
textControl.ParagraphStyles.Add(paragraphStyle)