menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramRuler - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DiagramRuler

    Defines the properties common to both horizontal and vertical rulers for measuring the diagram area.

    Inheritance
    System.Object
    DiagramRuler
    HorizontalRuler
    VerticalRuler
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramRuler : OwningComponentBase
    Remarks

    This base class provides properties shared between HorizontalRuler and VerticalRuler for defining their appearance.

    Constructors

    DiagramRuler()

    Declaration
    public DiagramRuler()

    Properties

    Interval

    Defines the number of intervals to be present on each segment of the ruler.

    Declaration
    public int Interval { get; set; }
    Property Value
    Type Description
    System.Int32

    The default intervals in a segment of the ruler is 5.

    Examples
        <SfDiagramComponent Height = "600px">
            <RulerSettings>
                <HorizontalRuler Interval = "7">
                </HorizontalRuler>
            </RulerSettings>
        </SfDiagramComponent>

    IntervalChanged

    Specifies the call back to trigger when Interval value changed.

    Declaration
    public EventCallback<int> IntervalChanged { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Int32>

    IsVisible

    Gets or sets the value indicating whether the horizontal and vertical rulers are visible in the diagram.

    Declaration
    public bool IsVisible { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value of IsVisible is true.

    Remarks

    Enabling this parameter displays both horizontal and vertical rulers in the diagram.

    Examples
        <SfDiagramComponent Height = "600px">
            <RulerSettings>
                <HorizontalRuler IsVisible = "true"/>
                <VerticalRuler IsVisible = "true"/>
            </RulerSettings>
        </SfDiagramComponent>

    IsVisibleChanged

    Specifies call back to trigger when IsVisible value changed.

    Declaration
    public EventCallback<bool> IsVisibleChanged { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.Boolean>

    MarkerColor

    Determines the color of the marker line/guide line for the ruler, the one which represents current position of cursor in diagram.

    Declaration
    public string MarkerColor { get; set; }
    Property Value
    Type Description
    System.String

    The default value of MarkerColor is "red".

    Examples
        <SfDiagramComponent Height = "600px">
            <RulerSettings>
                <HorizontalRuler Interval = "7" MarkerColor = "blue">
                </HorizontalRuler>
            </RulerSettings>
        </SfDiagramComponent>

    MarkerColorChanged

    Specifies the call back to trigger when MarkerColor value changed.

    Declaration
    public EventCallback<string> MarkerColorChanged { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<System.String>

    TickAlignment

    Gets or sets the alignment of tick marks in the ruler.

    Declaration
    public TickAlignment TickAlignment { get; set; }
    Property Value
    Type Description
    TickAlignment

    The default value is RightAndBottom.

    Remarks

    It controls the positioning of the ticks/hashmarks in the ruler. For more info regarding TickAlignment, refer to TickAlignment

    Examples
        <SfDiagramComponent Height = "600px">
            <RulerSettings>
                <HorizontalRuler TickAlignment = "TickAlignment.RightAndBottom">
                </HorizontalRuler>
            </RulerSettings>
        </SfDiagramComponent>

    TickAlignmentChanged

    Specifies the call back to trigger when TickAlignment value changed.

    Declaration
    public EventCallback<TickAlignment> TickAlignmentChanged { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<TickAlignment>

    Methods

    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.

    OnParametersSetAsync()

    Method invoked when any changes in component state occur.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    ="Task".

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved