menu

Blazor

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

    Show / Hide Table of Contents

    Class ISizeChangeEventArgs

    Notifies when the element is being resized.

    Inheritance
    System.Object
    ISizeChangeEventArgs
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ISizeChangeEventArgs : Object
    Examples
    <SfDiagram Height="600px" Nodes="@NodeCollection">
           <DiagramSnapSettings Constraints = "SnapConstraints.None" ></ DiagramSnapSettings >
           < DiagramEvents OnSizeChange="Size"></DiagramEvents>
    </SfDiagram>
    @code
       {
       public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>();
       public void Size(ISizeChangeEventArgs args)
       {
           args.Cancel = true;
           if ((args != null) && (args.State == State.Completed) && (args.Source != null) && (args.NewValue != null))
           {
               Console.WriteLine("Resized");
           }
       }
       protected override void OnInitialized()
       {
           NodeCollection = new ObservableCollection<DiagramNode>()
           {
               new DiagramNode(){
                   Id="node1",
                   Height = 100,
                   Width = 100,
                   OffsetX = 300,
                   OffsetY = 100
               },
           };
       }
    }

    Constructors

    ISizeChangeEventArgs()

    Declaration
    public ISizeChangeEventArgs()

    Properties

    Cancel

    Users can define whether the selected node can be resized or not.

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

    true, if the selected node is resized. Otherwise, false.

    NewValue

    Returns the element with new size property after the event has triggered.

    Declaration
    public DiagramSelectedItems NewValue { get; set; }
    Property Value
    Type Description
    DiagramSelectedItems

    The DiagramSelectedItems object representing the element with the new size property.

    OldValue

    Returns the element with the old size property.

    Declaration
    public DiagramSelectedItems OldValue { get; set; }
    Property Value
    Type Description
    DiagramSelectedItems

    The DiagramSelectedItems object representing the element with the old size property.

    Source

    Returns the element which has selected for the resizing.

    Declaration
    public DiagramSelectedItems Source { get; set; }
    Property Value
    Type Description
    DiagramSelectedItems

    The DiagramSelectedItems object representing the selected element for resizing.

    State

    Returns the state of the event such as start, completed.

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

    The State enum value representing the state of the event.

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