Table of Contents

Class BOBCodeBlock

Namespace
BlazOrbit.Components
Assembly
BlazOrbit.dll
[GenerateComponentInfo]
public class BOBCodeBlock : BOBComponentBase, IHasSize, IHasBorder, IHasBackgroundColor
Inheritance
object
ComponentBase
BOBCodeBlock
Implements
Inherited Members

Constructors

BOBCodeBlock()

public BOBCodeBlock()

Properties

BackgroundColor

Background color of the code block. Accepts any valid CSS color value, PaletteColor or BOBColor.

[Parameter]
public string? BackgroundColor { get; set; }

Property Value

string

Border

Border style applied to the code block edge.

[Parameter]
public BorderStyle? Border { get; set; }

Property Value

BorderStyle

Code

Source code to render and highlight. Required.

[Parameter]
[EditorRequired]
public string Code { get; set; }

Property Value

string

Language

Language.

[Parameter]
public SyntaxHighlightLanguage Language { get; set; }

Property Value

SyntaxHighlightLanguage

Size

Visual size of the code block.

[Parameter]
public BOBSize Size { get; set; }

Property Value

BOBSize

Title

Tooltip text displayed on hover.

[Parameter]
public string? Title { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

DisposeAsync()

public override ValueTask DisposeAsync()

Returns

ValueTask

OnParametersSet()

Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

protected override void OnParametersSet()