menu

Blazor

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

    Show / Hide Table of Contents

    Class IBlazorTextEditEventArgs

    Notifies when the label of an element undergoes editing.

    Inheritance
    System.Object
    IBlazorTextEditEventArgs
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class IBlazorTextEditEventArgs : Object
    Examples
    <SfDiagram Height="600px" Nodes="@NodeCollection">
           <DiagramEvents TextEdited = "TextEdited" ></ DiagramEvents >
    </ SfDiagram >
    @code
       {
       public ObservableCollection<DiagramNode> NodeCollection = new ObservableCollection<DiagramNode>();
       public void TextEdited(IBlazorTextEditEventArgs args)
       {
           args.Cancel = true;
           if ((args != null) && (args.Annotation != null) && (args.Element != null))
           {
               Console.WriteLine("Edited");
           }
       }
       protected override void OnInitialized()
       {
           // A node is created and stored in the node array.
           DiagramNode Node = new DiagramNode()
           {
               Id = "node1",
               Height = 100,
               Width = 100,
               OffsetX = 300,
               OffsetY = 100,
               Annotations = new ObservableCollection<DiagramNodeAnnotation>()
               {
                 // An annotation is created and stored in an Annotation collection of Node.
                  new DiagramNodeAnnotation() { Content = "Offset(0,0)", Offset = new NodeAnnotationOffset() { X = 0, Y = 0 }}
               }
           };
           NodeCollection.Add(Node);
       }
    }

    Constructors

    IBlazorTextEditEventArgs()

    Declaration
    public IBlazorTextEditEventArgs()

    Properties

    Annotation

    Returns the annotation which is being edited.

    Declaration
    public DiagramEventAnnotation Annotation { get; set; }
    Property Value
    Type Description
    DiagramEventAnnotation

    Cancel

    Users can define whether the annotation can be edit or not.

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

    true, if the annotation is edited. Otherwise, false.

    Element

    Returns the element such as node or connector in which the label is being edited.

    Declaration
    public DiagramEventObject Element { get; set; }
    Property Value
    Type Description
    DiagramEventObject

    A DiagramEventObject representing the element in which the label is being edited.

    NewValue

    Returns the new text value of the element which has edited.

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

    Accepts the string value.

    OldValue

    Returns the old text value of the element.

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

    Accepts the string value.

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