menu

Blazor

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

    Show / Hide Table of Contents

    Class Size

    Represents the dimension of an element, consisting of width and height properties.

    Inheritance
    System.Object
    Size
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class Size : Object

    Constructors

    Size()

    Declaration
    public Size()

    Size(Double, Double)

    Declaration
    public Size(double width, double height)
    Parameters
    Type Name Description
    System.Double width
    System.Double height

    Properties

    Height

    Gets or sets the height of an element.

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

    Accepts a double value. The default value is 0.

    Remarks

    This property indicates the vertical reach of an element, contributing to its overall shape and layout.

    Width

    Gets or sets the width of an element.

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

    Accepts a double value. The default value is 0.

    Remarks

    This property defines the horizontal span of an element, contributing to its overall shape and layout.

    Operators

    Equality(Size, Size)

    Determines whether two Size objects have the same dimensions.

    Declaration
    public static bool operator ==(Size a, Size b)
    Parameters
    Type Name Description
    Size a

    The first Size object to compare.

    Size b

    The second Size object to compare.

    Returns
    Type Description
    System.Boolean

    true if both the Width and Height properties of the two Size objects are equal; otherwise, false.

    Inequality(Size, Size)

    Determines whether two Size objects have different dimensions.

    Declaration
    public static bool operator !=(Size a, Size b)
    Parameters
    Type Name Description
    Size a

    The first Size object to compare.

    Size b

    The second Size object to compare.

    Returns
    Type Description
    System.Boolean

    true if either the Width or Height properties of the two Size objects are not equal; otherwise, false.

    Subtraction(Size, Size)

    Subtracts the dimensions of one Size object from another.

    Declaration
    public static Size operator -(Size a, Size b)
    Parameters
    Type Name Description
    Size a

    The first Size object to operate on.

    Size b

    The second Size object to subtract from the first.

    Returns
    Type Description
    Size

    A Size object representing the difference in dimensions between the two Size objects.

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