Class ParagraphAdv
Represents the ParagraphAdv class.
Implements
Namespace: Syncfusion.UI.Xaml.RichTextBoxAdv
Assembly: Syncfusion.SfRichTextBoxAdv.UWP.dll
Syntax
public class ParagraphAdv : BlockAdv, INode
Constructors
ParagraphAdv()
Initializes a new instance of the ParagraphAdv class.
Declaration
public ParagraphAdv()
Fields
CharacterFormatProperty
Identifies the CharacterFormat dependency property.
Declaration
public static readonly DependencyProperty CharacterFormatProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty | The identifier for the CharacterFormat dependency property. |
ParagraphFormatProperty
Identifies the ParagraphFormat dependency property.
Declaration
public static readonly DependencyProperty ParagraphFormatProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty | The identifier for the ParagraphFormat dependency property. |
Properties
CharacterFormat
Gets or sets the CharacterFormat of the ParagraphAdv.
Declaration
public CharacterFormat CharacterFormat { get; set; }
Property Value
Type | Description |
---|---|
CharacterFormat | The CharacterFormat of the ParagraphAdv. |
Examples
The following code example demonstrates how to define character format for a paragraph.
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:ParagraphAdv.CharacterFormat>
<RichTextBoxAdv:CharacterFormat Bold="True"/>
</RichTextBoxAdv:ParagraphAdv.CharacterFormat>
<RichTextBoxAdv:SpanAdv>Hello World.</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
ParagraphAdv paragraphAdv = new ParagraphAdv();
paragraphAdv.CharacterFormat = new CharacterFormat();
paragraphAdv.CharacterFormat.Bold = true;
SpanAdv spanAdv = new SpanAdv();
spanAdv.Text = "Hello world.";
paragraphAdv.Inlines.Add(spanAdv);
Dim paragraphAdv As New ParagraphAdv()
paragraphAdv.CharacterFormat = New CharacterFormat()
paragraphAdv.CharacterFormat.Bold = True
Dim spanAdv As New SpanAdv()
spanAdv.Text = "Hello world."
paragraphAdv.Inlines.Add(spanAdv)
Inlines
Gets or Sets the InlineCollection of the ParagraphAdv.
Declaration
public InlineCollection Inlines { get; }
Property Value
Type | Description |
---|---|
InlineCollection | The InlineCollection of the ParagraphAdv. |
Examples
The following code example demonstrates how to add inlines for a paragraph.
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Hello World.</RichTextBoxAdv:SpanAdv>
<!-- Add any number of spans, images, fields and comments. -->
</RichTextBoxAdv:ParagraphAdv>
ParagraphAdv paragraphAdv = new ParagraphAdv();
SpanAdv spanAdv = new SpanAdv();
spanAdv.Text = "Hello world.";
paragraphAdv.Inlines.Add(spanAdv);
// Add any number of spans, images, fields and comments.
Dim paragraphAdv As New ParagraphAdv()
Dim spanAdv As New SpanAdv()
spanAdv.Text = "Hello world."
paragraphAdv.Inlines.Add(spanAdv)
' Add any number of spans, images, fields and comments.
ParagraphFormat
Gets or sets the ParagraphFormat of the ParagraphAdv.
Declaration
public ParagraphFormat ParagraphFormat { get; set; }
Property Value
Type | Description |
---|---|
ParagraphFormat | The ParagraphFormat of the ParagraphAdv. |
Examples
The following code example demonstrates how to define paragraph format for a paragraph.
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:ParagraphAdv.ParagraphFormat>
<RichTextBoxAdv:ParagraphFormat TextAlignment="Center"/>
</RichTextBoxAdv:ParagraphAdv.ParagraphFormat>
<RichTextBoxAdv:SpanAdv>Hello World.</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
ParagraphAdv paragraphAdv = new ParagraphAdv();
paragraphAdv.ParagraphFormat = new ParagraphFormat();
paragraphAdv.ParagraphFormat.TextAlignment = TextAlignment.Center;
SpanAdv spanAdv = new SpanAdv();
spanAdv.Text = "Hello world.";
paragraphAdv.Inlines.Add(spanAdv);
Dim paragraphAdv As New ParagraphAdv()
paragraphAdv.ParagraphFormat = New ParagraphFormat()
paragraphAdv.ParagraphFormat.TextAlignment = TextAlignment.Center
Dim spanAdv As New SpanAdv()
spanAdv.Text = "Hello world."
paragraphAdv.Inlines.Add(spanAdv)