menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramRect - API Reference

    Show / Hide Table of Contents

    Class DiagramRect

    Represents the width, height and position of a rectangle.

    Inheritance
    System.Object
    DiagramRect
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramRect : Object
    Examples
    <SfDiagramComponent @ref = "diagram" Width="1000px" Height="1000px" @bind-Nodes="Nodes">
    </SfDiagramComponent>    
    @code
    {
        SfDiagramComponent diagram;
        private async Task PageBounds()
        {
            DiagramRect bounds = diagram.GetPageBounds();
        }
    }

    Constructors

    DiagramRect()

    Initializes a new instance of the DiagramRect.

    Declaration
    public DiagramRect()

    DiagramRect(DiagramRect)

    Creates a new instance of the DiagramRect from the given Rect.

    Declaration
    public DiagramRect(DiagramRect src)
    Parameters
    Type Name Description
    DiagramRect src

    Rect.

    DiagramRect(Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>)

    Creates a new DiagramRect instance with the specified x-coordinate, y-coordinate, width, and height.

    Declaration
    public DiagramRect(Nullable<double> x, Nullable<double> y, Nullable<double> width, Nullable<double> height)
    Parameters
    Type Name Description
    System.Nullable<System.Double> x

    The x-coordinate of the top-left corner of the rectangle.

    System.Nullable<System.Double> y

    The y-coordinate of the top-left corner of the rectangle.

    System.Nullable<System.Double> width

    The width of the rectangle.

    System.Nullable<System.Double> height

    The height of the rectangle.

    Properties

    Bottom

    Gets the bottom of the rectangle's y-axis value.

    Declaration
    public double Bottom { get; }
    Property Value
    Type Description
    System.Double

    Height

    Gets or sets the rectangle's height.

    Declaration
    public double Height { get; set; }
    Property Value
    Type Description
    System.Double

    Left

    Gets the x-axis value on the rectangle's left side.

    Declaration
    public double Left { get; }
    Property Value
    Type Description
    System.Double

    Right

    Gets the x-axis value on the rectangle's right side.

    Declaration
    public double Right { get; }
    Property Value
    Type Description
    System.Double

    Top

    Gets the y-axis location on the rectangle's top.

    Declaration
    public double Top { get; }
    Property Value
    Type Description
    System.Double

    Width

    Gets or sets the rectangle's width.

    Declaration
    public double Width { get; set; }
    Property Value
    Type Description
    System.Double

    X

    Gets or sets the x-axis value on the rectangle's left side.

    Declaration
    public double X { get; set; }
    Property Value
    Type Description
    System.Double

    The default value will be System.Double.MaxValue

    Y

    Gets or sets the y-axis value on the rectangle's top side.

    Declaration
    public double Y { get; set; }
    Property Value
    Type Description
    System.Double

    The default value will be System.Double.MaxValue

    Methods

    Clone()

    Creates a new rect that is a copy of the current rect.

    Declaration
    public object Clone()
    Returns
    Type Description
    System.Object

    it returns Rect

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