Section.FooterOffset Property
Returns the footer offset from the bottom of the page.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v24.2.dll
NuGet Package: DevExpress.Blazor.RichEdit
Declaration
public int FooterOffset { get; }
Property Value
Type | Description |
---|---|
Int32 | The offset, in twips. |
Remarks
The FooterOffset
property returns the footer offset from the bottom of the page in the current section. Use the Margins property to get the footer’s left, right, and top margins.
Call the section’s ChangePropertiesAsync(Action<SectionProperties>, CancellationToken) method to change the footer offset.
<DxRichEdit @ref="richEdit" />
@code {
DxRichEdit richEdit;
Document documentAPI;
@* ... *@
/* Surround the code that contains an asynchronous operation with a try-catch block to handle
the OperationCanceledException. This exception is thrown when an asynchronous operation is canceled. */
try {
documentAPI = richEdit.DocumentAPI;
@* ... *@
Section section = await documentAPI.Sections.GetAsync(0);
var footer = await section.GetFooterAsync(HeaderFooterType.Primary, true);
await footer.AddTextAsync(DateTime.Now.Year.ToString());
@* ... *@
var fParagraph = await footer.Paragraphs.GetAsync(0);
await fParagraph.ChangePropertiesAsync(properties => {
properties.Alignment = ParagraphAlignment.Center;
});
await section.ChangePropertiesAsync(properties => {
properties.FooterOffset = 700;
});
@* ... *@
}
catch (OperationCanceledException e) {
Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
}
}
Use methods of the UnitConverter class to convert centimeters, inches, pixels, or points to twips.
See Also