BlockContainer Class

Base class for markdown block nodes that can contain other blocks.

Implements

Namespace: Radzen.Blazor.Markdown

Assembly: Radzen.Blazor.dll

Syntax

public abstract class BlockContainer : Markdown.Block, Markdown.INode

Constructors

BlockContainerlink

Base class for markdown block nodes that can contain other blocks.

Declaration
protected BlockContainer()

Properties

Childrenlink

Returns the children of the block.

Declaration
public IReadOnlyList<Markdown.Block> Children { get; }
Property Value
Type Description
IReadOnlyList<Markdown.Block>Returns the children of the block.

FirstChildlink

Declaration
public Markdown.Block FirstChild { get; }
Property Value
Type Description
Markdown.Block

LastChildlink

Declaration
public Markdown.Block LastChild { get; }
Property Value
Type Description
Markdown.Block

Methods

Addlink

Appends a block to the children of the block.

Declaration
public virtual Markdown.T Add(Markdown.T block)
Parameters
Type Name Description
Markdown.T block The block to add.
Returns
Type Description
Markdown.TThe added block.

CanContainlink

Determines if the block can contain the specified node.

Declaration
public virtual bool CanContain(Markdown.Block node)
Parameters
Type Name Description
Markdown.Block node
Returns
Type Description
bool

NextSiblinglink

Returns the next sibling of the block.

Declaration
public Markdown.Block NextSibling(Markdown.Block block)
Parameters
Type Name Description
Markdown.Block block The block to get the next sibling of.
Returns
Type Description
Markdown.BlockThe next sibling of the block.

Removelink

Removes a block from the children of the block.

Declaration
public void Remove(Markdown.Block block)
Parameters
Type Name Description
Markdown.Block block The block to remove.

Replacelink

Replaces a block with another block.

Declaration
public void Replace(Markdown.Block source, Markdown.Block target)
Parameters
Type Name Description
Markdown.Block source The block to replace.
Markdown.Block target The block to replace with.
An error has occurred. This app may no longer respond until reloaded. Reload 🗙