Class BlockContainer
Base class for markdown block nodes that can contain other blocks.
Implements
Inherited Members
Namespace: Radzen.Blazor.Markdown
Assembly: Radzen.Blazor.dll
Syntax
public abstract class BlockContainer : Block, INodeConstructors
BlockContainer()
Base class for markdown block nodes that can contain other blocks.
Declaration
protected BlockContainer()Properties
Children
Returns the children of the block.
Declaration
public IReadOnlyList<Block> Children { get; }Property Value
| Type | Description | 
|---|---|
| IReadOnlyList<Block> | 
FirstChild
Returns the first child of the block.
Declaration
public override Block? FirstChild { get; }Property Value
| Type | Description | 
|---|---|
| Block | 
Overrides
LastChild
Returns the last child of the block.
Declaration
public override Block? LastChild { get; }Property Value
| Type | Description | 
|---|---|
| Block | 
Overrides
Methods
Add<T>(T)
Appends a block to the children of the block.
Declaration
public virtual T Add<T>(T block) where T : BlockParameters
| Type | Name | Description | 
|---|---|---|
| T | block | The block to add. | 
Returns
| Type | Description | 
|---|---|
| T | The added block. | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type of the block. | 
CanContain(Block)
Determines if the block can contain the specified node.
Declaration
public virtual bool CanContain(Block node)Parameters
| Type | Name | Description | 
|---|---|---|
| Block | node | 
Returns
| Type | Description | 
|---|---|
| bool | 
NextSibling(Block)
Returns the next sibling of the block.
Declaration
public Block? NextSibling(Block block)Parameters
| Type | Name | Description | 
|---|---|---|
| Block | block | The block to get the next sibling of. | 
Returns
| Type | Description | 
|---|---|
| Block | The next sibling of the block. | 
Remove(Block)
Removes a block from the children of the block.
Declaration
public void Remove(Block block)Parameters
| Type | Name | Description | 
|---|---|---|
| Block | block | The block to remove. | 
Replace(Block, Block)
Replaces a block with another block.
Declaration
public void Replace(Block source, Block target)Parameters
| Type | Name | Description | 
|---|---|---|
| Block | source | The block to replace. | 
| Block | target | The block to replace with. |