Class SectionAdv
Represents the SectionAdv class.
Implements
Namespace: Syncfusion.Windows.Controls.RichTextBoxAdv
Assembly: Syncfusion.SfRichTextBoxAdv.WPF.dll
Syntax
public class SectionAdv : CompositeNode, INode
Constructors
SectionAdv()
Initializes a new instance of the SectionAdv class.
Declaration
public SectionAdv()
Properties
Blocks
Gets the BlockAdvCollection of the SectionAdv.
Declaration
public BlockAdvCollection Blocks { get; }
Property Value
Type | Description |
---|---|
BlockAdvCollection | The BlockAdvCollection of the SectionAdv. |
Examples
The following code example demonstrates how to add blocks for the section.
<RichTextBoxAdv:SectionAdv>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Hello World.</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
<!-- You can add any number of paragraphs and tables. -->
</RichTextBoxAdv:SectionAdv>
SectionAdv sectionAdv = new SectionAdv();
ParagraphAdv paragraphAdv = new ParagraphAdv();
SpanAdv spanAdv = new SpanAdv();
spanAdv.Text = "Hello world.";
paragraphAdv.Inlines.Add(spanAdv);
sectionAdv.Blocks.Add(paragraphAdv);
// You can add any number of paragraphs and tables.
Dim sectionAdv As New SectionAdv()
Dim paragraphAdv As New ParagraphAdv()
Dim spanAdv As New SpanAdv()
spanAdv.Text = "Hello world."
paragraphAdv.Inlines.Add(spanAdv)
sectionAdv.Blocks.Add(paragraphAdv)
' You can add any number of paragraphs and tables.
HeaderFooters
Gets or sets the HeaderFooters of the SectionAdv.
Declaration
public HeaderFooters HeaderFooters { get; set; }
Property Value
Type | Description |
---|---|
HeaderFooters | The HeaderFooters of the SectionAdv. |
Examples
The following code example demonstrates how to add header and footer for the section.
<RichTextBoxAdv:SectionAdv>
<!-- Defines the header and footer for the section. -->
<RichTextBoxAdv:SectionAdv.HeaderFooters>
<RichTextBoxAdv:HeaderFooters>
<RichTextBoxAdv:HeaderFooters.Header>
<RichTextBoxAdv:HeaderFooter>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>29 March 2016</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:HeaderFooter>
</RichTextBoxAdv:HeaderFooters.Header>
<RichTextBoxAdv:HeaderFooters.Footer>
<RichTextBoxAdv:HeaderFooter>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Tuesday</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:HeaderFooter>
</RichTextBoxAdv:HeaderFooters.Footer>
</RichTextBoxAdv:HeaderFooters>
</RichTextBoxAdv:SectionAdv.HeaderFooters>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Hello World.</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:SectionAdv>
SectionAdv sectionAdv = new SectionAdv();
// Defines the header and footer.
HeaderFooters headerFooters = new HeaderFooters();
// Defines the header.
headerFooters.Header = new HeaderFooter();
ParagraphAdv headerParagraph = new ParagraphAdv();
SpanAdv headerSpan = new SpanAdv();
headerSpan.Text = "29 March 2016";
headerParagraph.Inlines.Add(headerSpan);
headerFooters.Header.Blocks.Add(headerParagraph);
// Defines the footer.
headerFooters.Footer = new HeaderFooter();
ParagraphAdv footerParagraph = new ParagraphAdv();
SpanAdv footerSpan = new SpanAdv();
footerSpan.Text = "29 March 2016";
footerParagraph.Inlines.Add(footerSpan);
headerFooters.Footer.Blocks.Add(footerParagraph);
sectionAdv.HeaderFooters = headerFooters;
ParagraphAdv paragraphAdv = new ParagraphAdv();
SpanAdv spanAdv = new SpanAdv();
spanAdv.Text = "Hello world.";
paragraphAdv.Inlines.Add(spanAdv);
sectionAdv.Blocks.Add(paragraphAdv);
// You can add any number of paragraphs and tables.
Dim sectionAdv As New SectionAdv()
' Defines the header and footer.
Dim headerFooters As New HeaderFooters()
' Defines the header.
headerFooters.Header = New HeaderFooter()
Dim headerParagraph As New ParagraphAdv()
Dim headerSpan As New SpanAdv()
headerSpan.Text = "29 March 2016"
headerParagraph.Inlines.Add(headerSpan)
headerFooters.Header.Blocks.Add(headerParagraph)
// Defines the footer.
headerFooters.Footer = New HeaderFooter()
Dim footerParagraph As New ParagraphAdv()
Dim footerSpan As New SpanAdv()
footerSpan.Text = "29 March 2016"
footerParagraph.Inlines.Add(footerSpan)
headerFooters.Footer.Blocks.Add(footerParagraph)
sectionAdv.HeaderFooters = headerFooters
Dim paragraphAdv As New ParagraphAdv()
Dim spanAdv As New SpanAdv()
spanAdv.Text = "Hello world."
paragraphAdv.Inlines.Add(spanAdv)
sectionAdv.Blocks.Add(paragraphAdv)
' You can add any number of paragraphs and tables.
SectionFormat
Gets or sets the SectionFormat of the SectionAdv.
Declaration
public SectionFormat SectionFormat { get; set; }
Property Value
Type | Description |
---|---|
SectionFormat | The SectionFormat of the SectionAdv. |
Examples
The following code example demonstrates how to define the section format for a section.
<RichTextBoxAdv:SectionAdv>
<!-- Defines the section format. -->
<RichTextBoxAdv:SectionAdv.SectionFormat>
<RichTextBoxAdv:SectionFormat PageSize="480 520"/>
</RichTextBoxAdv:SectionAdv.SectionFormat>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Hello World.</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:SectionAdv>
SectionAdv sectionAdv = new SectionAdv();
// Defines the section format.
SectionFormat sectionFormat = new SectionFormat();
sectionFormat.PageSize = new Size(480, 520);
sectionAdv.SectionFormat = sectionFormat;
ParagraphAdv paragraphAdv = new ParagraphAdv();
SpanAdv spanAdv = new SpanAdv();
spanAdv.Text = "Hello world.";
paragraphAdv.Inlines.Add(spanAdv);
sectionAdv.Blocks.Add(paragraphAdv);
// You can add any number of paragraphs and tables.
Dim sectionAdv As New SectionAdv()
' Defines the section format.
Dim sectionFormat As New SectionFormat()
sectionFormat.PageSize = New Size(480, 520)
sectionAdv.SectionFormat = sectionFormat
Dim paragraphAdv As New ParagraphAdv()
Dim spanAdv As New SpanAdv()
spanAdv.Text = "Hello world."
paragraphAdv.Inlines.Add(spanAdv)
sectionAdv.Blocks.Add(paragraphAdv)
' You can add any number of paragraphs and tables.