Class GridLines
Represents the visual guidance while dragging or arranging the objects.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class GridLines : SfBaseComponent
Examples
<SfDiagramComponent Width = "1000px" Height="500px">
<SnapSettings Constraints="SnapConstraints.ShowLines">
<HorizontalGridLines LineColor="blue" LineDashArray="2,2" LineIntervals="@LineInterval">
</HorizontalGridLines>
<VerticalGridLines LineColor="blue" LineDashArray="2,2" LineIntervals="@LineInterval">
</VerticalGridLines>
</SnapSettings>
</SfDiagramComponent>
@code
{
//Set the line intervals for the gridlines
public double[] LineInterval { get; set; } = new double[]
{
1.25, 14, 0.25, 15, 0.25, 15, 0.25, 15, 0.25, 15
};
}
Constructors
GridLines()
Declaration
public GridLines()
Properties
DotIntervals
Represents the pattern of gaps defined by a set of dots.
Declaration
public double[] DotIntervals { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] |
DotIntervalsChanged
Specifies the callback to trigger when the dotintervals changes.
Declaration
public EventCallback<double[]> DotIntervalsChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Double[]> |
LineColor
Defines the color of the horizontal or vertical gridlines.
Declaration
public string LineColor { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LineColorChanged
Specifies the callback to trigger when the linecolor changes.
Declaration
public EventCallback<string> LineColorChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.String> |
LineDashArray
Defines the pattern of dashes and gaps in the horizontal or vertical gridlines.
Declaration
public string LineDashArray { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LineDashArrayChanged
Specifies the callback to trigger when the linedasharray changes.
Declaration
public EventCallback<string> LineDashArrayChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.String> |
LineIntervals
The thickness and the space between horizontal/vertical gridlines can be customized by using line intervals.
Declaration
public double[] LineIntervals { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] |
LineIntervalsChanged
Specifies the callback to trigger when the lineintervals changes.
Declaration
public EventCallback<double[]> LineIntervalsChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Double[]> |
SnapIntervals
Specifies a set of intervals for snapping the objects. By default, the objects are snapped towards the nearest grid line.
Declaration
public double[] SnapIntervals { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] |
SnapIntervalsChanged
Specifies the callback to trigger when the snapintervals changes.
Declaration
public EventCallback<double[]> SnapIntervalsChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Double[]> |
Methods
Dispose()
This method releasing all unmanaged resources.
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. |
Overrides
OnParametersSetAsync()
Method invoked when any changes in component state occurs.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | ="Task". |