menu

Blazor

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

    Show / Hide Table of Contents

    Class SizeChangedEventArgs

    Notifies when the element is resized.

    Inheritance
    System.Object
    SizeChangedEventArgs
    SizeChangingEventArgs
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SizeChangedEventArgs : Object
    Examples
    <SfDiagramComponent Height="600px" Nodes="@nodes" SizeChanged="@SizeChanged" />
    @code
    {
        // To define the node collection
        DiagramObjectCollection<Node> nodes;
        protected override void OnInitialized()
        {
            nodes = new DiagramObjectCollection<Node>();
            // A node is created and stored in the nodes collection.
            Node node = new Node()
            {
                // Position of the node
                OffsetX = 250,
                OffsetY = 250,
                // Size of the node
                Width = 100,
                Height = 100,
                Style = new ShapeStyle() { Fill = "#6BA5D7", StrokeColor = "white" }
            };
            // Add a node
            nodes.Add(node);
        }
        // Size change event for the diagram
        public void SizeChanged(SizeChangedEventArgs args)
        {
            Console.WriteLine(args.NewValue.Nodes[0].ID);
        }
    }

    Constructors

    SizeChangedEventArgs()

    Declaration
    public SizeChangedEventArgs()

    Properties

    Element

    Returns the element which has been selected for the resizing.

    Declaration
    public DiagramSelectionSettings Element { get; }
    Property Value
    Type Description
    DiagramSelectionSettings

    The DiagramSelectionSettings object representing the selected element for resizing.

    NewValue

    Returns the new width, height, offsetX and offsetY values of the element that is resized

    Declaration
    public DiagramSelectionSettings NewValue { get; }
    Property Value
    Type
    DiagramSelectionSettings

    OldValue

    Returns the previous width, height, offsetX and offsetY values of the element that is resized.

    Declaration
    public DiagramSelectionSettings OldValue { get; }
    Property Value
    Type
    DiagramSelectionSettings
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved