Class RulerSettingsModel
Defines the appearance and behavior of the rulers in the diagram.
Inheritance
System.Object
RulerSettingsModel
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class RulerSettingsModel : Object
Examples
<SfDiagram Height="600px" Nodes="@NodeCollection">
<DiagramRulerSettings ShowRulers = "true" DynamicGrid="true">
<HorizontalRuler></HorizontalRuler>
<VerticalRuler></VerticalRuler>
</DiagramRulerSettings>
</SfDiagram>
@code{
public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>() { };
protected override void OnInitialized()
{
DiagramNode Node = new DiagramNode()
{
OffsetX = 250,
OffsetY = 250,
Width = 100,
Height = 100,
};
NodeCollection.Add(Node);
}
}
Constructors
RulerSettingsModel()
Declaration
public RulerSettingsModel()
Properties
DynamicGrid
Sets the gridlines relative to the ruler ticks. By default, DynamicGrid is set to true.
Declaration
public bool DynamicGrid { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
HorizontalRuler
Sets the behavior and appearance of the horizontal rulers.
Declaration
public DiagramsRuler HorizontalRuler { get; set; }
Property Value
Type | Description |
---|---|
DiagramsRuler |
ShowRulers
Enables or disables the visibility of both horizontal and vertical rulers. By default, the ShowRulers is set to false.
Declaration
public bool ShowRulers { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
VerticalRuler
Sets the behavior and appearance of the vertical rulers.
Declaration
public DiagramsRuler VerticalRuler { get; set; }
Property Value
Type | Description |
---|---|
DiagramsRuler |