Class PageMargin
Represents the margin settings for a diagram page in the SfDiagramComponent.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class PageMargin : DiagramMargin
Remarks
The PageMargin component sets the space around diagram content within the page.
It inherits from DiagramMargin and works automatically with the parent PageSettings.
Changes to margin values are synced with the parent diagram for consistent spacing.
Examples
The following example demonstrates how to configure page margins for a diagram:
<SfDiagramComponent>
<PageSettings >
<PageMargin Left = "@marginLeft" Right="@marginRight" Top="@marginTop" Bottom="@marginBottom"></PageMargin>
</PageSettings>
</SfDiagramComponent>
@code
{
double marginLeft = 10;
double marginRight = 10;
double marginTop = 10;
double marginBottom = 10;
}
Constructors
PageMargin()
Declaration
public PageMargin()
Methods
Dispose()
Releases all unmanaged resources used by the PageMargin instance and clears parent references.
Declaration
public void Dispose()
OnAfterRenderAsync(Boolean)
Method invoked after each time the component has been rendered.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender | Set to true for the first time component rendering; otherwise gets false. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when any changes in component state occurs.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | ="Task". |