alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class BlockData

    Provides context for a block operation, including current and previous block and parent references.

    Inheritance
    object
    BlockData
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.BlockEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class BlockData
    Remarks

    Not all properties are applicable for every BlockAction. For example, PreviousBlock may be null for insertions. Parent references may be null for root-level blocks.

    Examples

    Example payload for a moved block where the parent changed.

    var data = new BlockData
    {
        Block = new BlockModel { ID = "b-200", BlockType = BlockType.Paragraph },
        PreviousBlock = null, // Not relevant for a pure move without content change
        CurrentParent = new BlockModel { ID = "parent-new", BlockType = BlockType.Template },
        PreviousParent = new BlockModel { ID = "parent-old", BlockType = BlockType.Template }
    };

    Constructors

    BlockData()

    Declaration
    public BlockData()

    Properties

    Block

    Gets or sets the current block model after the change.

    Declaration
    public BlockModel Block { get; set; }
    Property Value
    Type Description
    BlockModel

    A BlockModel representing the block’s state post-change. The default value is null.

    Remarks

    May be null for delete operations.

    CurrentParent

    Gets or sets the current parent block, if the block is nested.

    Declaration
    public BlockModel CurrentParent { get; set; }
    Property Value
    Type Description
    BlockModel

    A BlockModel representing the new parent after the change. The default value is null.

    Remarks

    Root-level blocks will have null for this property.

    PreviousBlock

    Gets or sets the previous block model before the change, if applicable.

    Declaration
    public BlockModel PreviousBlock { get; set; }
    Property Value
    Type Description
    BlockModel

    A BlockModel representing the block’s state before the change. The default value is null.

    Remarks

    Typically present for update operations; otherwise, may be null.

    PreviousParent

    Gets or sets the previous parent block, if the block’s parent changed.

    Declaration
    public BlockModel PreviousParent { get; set; }
    Property Value
    Type Description
    BlockModel

    A BlockModel representing the old parent before the change. The default value is null.

    Remarks

    Only applicable for move operations that change hierarchy.

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