Class SectionFormat
Represents the SectionFormat class.
Namespace: Syncfusion.Windows.Controls.RichTextBoxAdv
Assembly: Syncfusion.SfRichTextBoxAdv.WPF.dll
Syntax
public sealed class SectionFormat : BaseNode
Constructors
SectionFormat()
Initializes a new instance of the SectionFormat class.
Declaration
public SectionFormat()
SectionFormat(SectionAdv)
Initializes a new instance of the SectionFormat class for the specified SectionAdv.
Declaration
public SectionFormat(SectionAdv sectionAdv)
Parameters
Type | Name | Description |
---|---|---|
SectionAdv | sectionAdv | The value can null or an instance of SectionAdv. |
Fields
DifferentFirstPageProperty
Identifies the DifferentFirstPage dependency property.
Declaration
public static readonly DependencyProperty DifferentFirstPageProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the DifferentFirstPage dependency property. |
DifferentOddAndEvenPagesProperty
Identifies the DifferentOddAndEvenPages dependency property.
Declaration
public static readonly DependencyProperty DifferentOddAndEvenPagesProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the DifferentOddAndEvenPages dependency property. |
FooterDistanceProperty
Identifies the FooterDistance dependency property.
Declaration
public static readonly DependencyProperty FooterDistanceProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the FooterDistance dependency property. |
HeaderDistanceProperty
Identifies the HeaderDistance dependency property.
Declaration
public static readonly DependencyProperty HeaderDistanceProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the HeaderDistance dependency property. |
PageMarginProperty
Identifies the PageMargin dependency property.
Declaration
public static readonly DependencyProperty PageMarginProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the PageMargin dependency property. |
PageSizeProperty
Identifies the PageSize dependency property.
Declaration
public static readonly DependencyProperty PageSizeProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the PageSize dependency property. |
Properties
DifferentFirstPage
Gets or sets a value indicating whether the section has different first page.
Declaration
public bool DifferentFirstPage { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True, if the section has different first page. Otherwise False. |
Examples
The following code example demonstrates how to specify that a section has different first page header and footer.
<!-- Defines a Section that has different first page header and footer. -->
<RichTextBoxAdv:SectionAdv>
<RichTextBoxAdv:SectionAdv.SectionFormat>
<RichTextBoxAdv:SectionFormat DifferentFirstPage="True"/>
</RichTextBoxAdv:SectionAdv.SectionFormat>
<!-- Define the blocks, headers and footers of the section. -->
</RichTextBoxAdv:SectionAdv>
// Defines a Section that has different first page header and footer.
SectionAdv section = new SectionAdv();
SectionFormat sectionFormat = new SectionFormat();
sectionFormat.DifferentFirstPage = true;
section.SectionFormat = sectionFormat;
// Define the blocks, headers and footers of the section.
' Defines a Section that has different first page header and footer.
Dim section As New SectionAdv()
Dim sectionFormat As New SectionFormat()
sectionFormat.DifferentFirstPage = True
section.SectionFormat = sectionFormat
' Define the blocks, headers and footers of the section.
DifferentOddAndEvenPages
Gets or sets a value indicating whether the section has different odd and even pages.
Declaration
public bool DifferentOddAndEvenPages { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True, if the section has different odd and even pages. Otherwise False. |
Examples
The following code example demonstrates how to specify that a section has different odd and even pages header and footer.
<!-- Defines a Section that has different odd and even pages header and footer. -->
<RichTextBoxAdv:SectionAdv>
<RichTextBoxAdv:SectionAdv.SectionFormat>
<RichTextBoxAdv:SectionFormat DifferentOddAndEvenPages="True"/>
</RichTextBoxAdv:SectionAdv.SectionFormat>
<!-- Define the blocks, headers and footers of the section. -->
</RichTextBoxAdv:SectionAdv>
// Defines a Section that has different odd and even pages header and footer.
SectionAdv section = new SectionAdv();
SectionFormat sectionFormat = new SectionFormat();
sectionFormat.DifferentOddAndEvenPages = true;
section.SectionFormat = sectionFormat;
// Define the blocks, headers and footers of the section.
' Defines a Section that has different odd and even pages header and footer.
Dim section As New SectionAdv()
Dim sectionFormat As New SectionFormat()
sectionFormat.DifferentOddAndEvenPages = True
section.SectionFormat = sectionFormat
' Define the blocks, headers and footers of the section.
FooterDistance
Gets or Sets the footer distance from the page bottom.
Declaration
public double FooterDistance { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The footer distance from the page bottom. |
Examples
The following code example demonstrates how to define the footer distance for a section.
<!-- Defines a Section with footer distance of 48 pixels. -->
<RichTextBoxAdv:SectionAdv>
<RichTextBoxAdv:SectionAdv.SectionFormat>
<RichTextBoxAdv:SectionFormat FooterDistance="48"/>
</RichTextBoxAdv:SectionAdv.SectionFormat>
<!-- Define the blocks, headers and footers of the section. -->
</RichTextBoxAdv:SectionAdv>
// Defines a Section with footer distance of 48 pixels.
SectionAdv section = new SectionAdv();
SectionFormat sectionFormat = new SectionFormat();
sectionFormat.FooterDistance = 48;
section.SectionFormat = sectionFormat;
// Define the blocks, headers and footers of the section.
' Defines a Section with footer distance of 48 pixels.
Dim section As New SectionAdv()
Dim sectionFormat As New SectionFormat()
sectionFormat.FooterDistance = 48
section.SectionFormat = sectionFormat
' Define the blocks, headers and footers of the section.
HeaderDistance
Gets or Sets the header distance from the page top.
Declaration
public double HeaderDistance { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The header distance from the page top. |
Examples
The following code example demonstrates how to define the header distance for a section.
<!-- Defines a Section with header distance of 06 pixels. -->
<RichTextBoxAdv:SectionAdv>
<RichTextBoxAdv:SectionAdv.SectionFormat>
<RichTextBoxAdv:SectionFormat HeaderDistance="96"/>
</RichTextBoxAdv:SectionAdv.SectionFormat>
<!-- Define the blocks, headers and footers of the section. -->
</RichTextBoxAdv:SectionAdv>
// Defines a Section with header distance of 96 pixels.
SectionAdv section = new SectionAdv();
SectionFormat sectionFormat = new SectionFormat();
sectionFormat.HeaderDistance = 96;
section.SectionFormat = sectionFormat;
// Define the blocks, headers and footers of the section.
' Defines a Section with header distance of 96 pixels.
Dim section As New SectionAdv()
Dim sectionFormat As New SectionFormat()
sectionFormat.HeaderDistance = 96
section.SectionFormat = sectionFormat
' Define the blocks, headers and footers of the section.
PageMargin
Gets or Sets the margin of the page.
Declaration
public Thickness PageMargin { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Thickness | The page margin. |
Examples
The following code example demonstrates how to define the page margin for a section.
<!-- Defines a Section with left and right page margins as 96 pixels and top and bottom margins as 48 pixels respectively. -->
<RichTextBoxAdv:SectionAdv>
<RichTextBoxAdv:SectionAdv.SectionFormat>
<RichTextBoxAdv:SectionFormat PageMargin="96 48 96 48"/>
</RichTextBoxAdv:SectionAdv.SectionFormat>
<!-- Define the blocks, headers and footers of the section. -->
</RichTextBoxAdv:SectionAdv>
// Defines a Section with left and right page margins as 96 pixels and top and bottom margins as 48 pixels respectively.
SectionAdv section = new SectionAdv();
SectionFormat sectionFormat = new SectionFormat();
sectionFormat.PageMargin = new Thickness(96, 48, 96, 48);
section.SectionFormat = sectionFormat;
// Define the blocks, headers and footers of the section.
' Defines a Section with left and right page margins as 96 pixels and top and bottom margins as 48 pixels respectively.
Dim section As New SectionAdv()
Dim sectionFormat As New SectionFormat()
sectionFormat.PageMargin = New Thickness(96, 48, 96, 48)
section.SectionFormat = sectionFormat
' Define the blocks, headers and footers of the section.
PageSize
Gets or Sets the size of the page.
Declaration
public Size PageSize { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Size | The size of the page. |
Examples
The following code example demonstrates how to define the page size for a section.
<!-- Defines a Section of page size 480 x 520 pixels. -->
<RichTextBoxAdv:SectionAdv>
<RichTextBoxAdv:SectionAdv.SectionFormat>
<RichTextBoxAdv:SectionFormat PageSize="480 520"/>
</RichTextBoxAdv:SectionAdv.SectionFormat>
<!-- Define the blocks, headers and footers of the section. -->
</RichTextBoxAdv:SectionAdv>
// Defines a Section of page size 480 x 520 pixels.
SectionAdv section = new SectionAdv();
SectionFormat sectionFormat = new SectionFormat();
sectionFormat.PageSize = new Size(480, 520);
section.SectionFormat = sectionFormat;
// Define the blocks, headers and footers of the section.
' Defines a Section of page size 480 x 520 pixels.
Dim section As New SectionAdv()
Dim sectionFormat As New SectionFormat()
sectionFormat.PageSize = New Size(480, 520)
section.SectionFormat = sectionFormat
' Define the blocks, headers and footers of the section.