Gets or sets the paragraph's formatting attributes. The property's value is an object of the type Paragraph
public ParagraphFormat ParagraphFormat { get; set; }
Public Property ParagraphFormat() As ParagraphFormat
The following example uses Format property and sets its value as numbered format.
TXTextControl.ParagraphFormat numberedParagraphFormat = new TXTextControl.ParagraphFormat();
numberedParagraphFormat.Alignment = TXTextControl.HorizontalAlignment.Left;
numberedParagraphFormat.LeftIndent = 200;
numberedParagraphFormat.RightIndent = 500;
numberedParagraphFormat.HangingIndent = 100;
foreach (TXTextControl.Paragraph p in textControl1.Paragraphs)
{
textControl1.InputPosition = new TXTextControl.InputPosition(p.Start - 1);
if (p.Length >= 3)
{
textControl1.Selection.Text = p.Number.ToString() + ". ";
p.Format = numberedParagraphFormat;
}
}
Dim NumberedParagraphFormat As New TXTextControl.ParagraphFormat(TXTextControl.HorizontalAlignment.Left)
NumberedParagraphFormat.Alignment = TXTextControl.HorizontalAlignment.Left
NumberedParagraphFormat.KeepLinesTogether = True
NumberedParagraphFormat.LeftIndent = 200
NumberedParagraphFormat.RightIndent = 500
NumberedParagraphFormat.HangingIndent = 100
For Each p As TXTextControl.Paragraph In TextControl1.Paragraphs
TextControl1.InputPosition = New TXTextControl.InputPosition(p.Start - 1)
If p.Length >= 3 Then
TextControl1.Selection.Text = p.Number.ToString() + ". "
p.Format = NumberedParagraphFormat
End If
Next