Class DiagramPageSettings
DiagramPagesetting enables to customize the appearance, width, and height of the diagram page.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class DiagramPageSettings : SfDiagramBaseExtension, IBaseInit
Examples
<SfDiagram Height="600px" id="diagram">
@* Initialize the page settings with page orientation and break lines*@
<DiagramPageSettings Height = "300" Width="300" Orientation="PageOrientation.Landscape" ShowPageBreaks="true">
@* Set the page margin*@
<PageSettingsMargin Left = "10" Top="10" Bottom="10" />
</DiagramPageSettings>
</SfDiagram>
Constructors
DiagramPageSettings()
Declaration
public DiagramPageSettings()
Properties
Background
Defines the appearance of the page background.
Declaration
public DiagramBackground Background { get; set; }
Property Value
Type | Description |
---|---|
DiagramBackground |
Remarks
Users can customize the background of the diagram page by using background property. Source property of background allows the user to set the path of the image to the background whereas the Color property of background allows the user to set a color to the background of the diagram page. By default, it is set to transparent.
Examples
<SfDiagram Height="600px" id="diagram">
@*Initialize the page settings with page orientation and break lines*@
<DiagramPageSettings Height="300" Width="300" Orientation="PageOrientation.Landscape" ShowPageBreaks="true">
//set image to the background
<DiagramBackground Source="https://www.w3schools.com/images/w3schools_green.jpg" />
//set color to the background
<DiagramBackground Color="lightblue" />
<PageSettingsMargin Left="10" Top="10" Bottom="10" />
</DiagramPageSettings>
</SfDiagram>
BoundaryConstraints
This property allows the user to customize the interactive region.
Declaration
public BoundaryConstraints BoundaryConstraints { get; set; }
Property Value
Type | Description |
---|---|
BoundaryConstraints |
Remarks
� The boundary constraints property restricts or customizes the interactive region, out of which the elements cannot be dragged, resized or rotated. |
� The following values can be set to the boundary constraints property. They are infinity, diagram, page. By default, boundary constraints will be infinity. |
ChildContent
Represents a segment of UI content, implemented.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment |
FitOptions
This property allows the user to specify the diagram content can fit within the diagram
Declaration
public DiagramFitOptions FitOptions { get; set; }
Property Value
Type | Description |
---|---|
DiagramFitOptions |
Remarks
Users can customize the FitOptions property when the diagram content is not fit into the diagram. There are some options available on the FitOptions property.They are Mode, Region, CustomBounds, Margin, CanZoomIn, and CanFit.These options have default values.Users can customize these options based on their requirements.
Examples
<SfDiagram Height="600px" id="diagram">
<DiagramPageSettings Height="300" Width="300" Orientation="PageOrientation.Landscape" ShowPageBreaks="true">
<DiagramFitOptions CanFit="true" Mode="FitModes.Width" CanZoomIn="true" Region=" DiagramRegion.Content"></DiagramFitOptions>
<PageSettingsMargin Left="10" Top="10" Bottom="10" />
</DiagramPageSettings>
</SfDiagram>
Height
Gets or sets the height of the diagram page.
Declaration
public Nullable<double> Height { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
jsProperty
Declaration
protected override string jsProperty { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
mainParent
Declaration
protected override SfDiagramBaseExtension mainParent { get; set; }
Property Value
Type | Description |
---|---|
Syncfusion.Blazor.Diagrams.Internal.SfDiagramBaseExtension |
Overrides
Margin
Specifies the space around the diagram content. The default values for the margin are set to 25 from all sides.
Declaration
public PageSettingsMargin Margin { get; set; }
Property Value
Type | Description |
---|---|
PageSettingsMargin |
Examples
<DiagramPageSettings Height="300" Width="300" MultiplePage="true" ShowPageBreaks="true">
<PageSettingsMargin Left="10" Top="10" Bottom="10" Right />
</DiagramPageSettings>
MultiplePage
This property allows users to enable or disable multiple pages.
Declaration
public bool MultiplePage { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
When multiple pages are enabled, the size of the page dynamically increases or decreases to split the single page into multiple pages and completely fits the diagram within the page boundaries.
Orientation
Gets or sets the orientation of the page in the diagram. By default, the orientation of the page is set to landscape.
Declaration
public PageOrientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
PageOrientation |
Remarks
ShowPageBreaks property is used as a visual guide to see how pages are split into multiple pages. By default, it will be false. If it is true, then the page break lines will be visible.
ShowPageBreaks
This property allows, the user to enable or disable the page break lines
Declaration
public bool ShowPageBreaks { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
ShowPageBreaks property is used as a visual guide to see how pages are split into multiple pages. By default, it will be false. If it is true, then the page break lines will be visible.
Width
Gets or sets the width of the diagram page
Declaration
public Nullable<double> Width { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
Dispose()
Declaration
public override void Dispose()
Overrides
GetJSNamespace()
Declaration
public string GetJSNamespace()
Returns
Type | Description |
---|---|
System.String | Get the parent namespaces |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns asynchronous operation when the component is ready to start, having received its initial parameters from its parent in the render tree |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Returns asynchronous operation when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties |
updateChildProperties(String, Object)
Declaration
public void updateChildProperties(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.Object | value |