Skip to main content

MarkdownCodeBlock Class

Definition

Assembly:Avalonia.Controls.Markdown
Package:Avalonia.Controls.Markdown

A Avalonia.Controls.Documents.Paragraph that represents a fenced code block. Carries the language identifier so the render layer can apply syntax highlighting without extra lookups.

public class MarkdownCodeBlock

Inheritance: Paragraph -> MarkdownCodeBlock

Constructors

NameDescription
MarkdownCodeBlockNo summary available.

MarkdownCodeBlock Constructor

public MarkdownCodeBlock()

Properties

NameDescription
HighlighterGets or sets the Avalonia.Controls.CodeHighlighter used to render syntax-highlighted code.
LanguageIdGets or sets the language identifier string (e.g. "csharp") for syntax highlighting.

Highlighter Property

Gets or sets the Avalonia.Controls.CodeHighlighter used to render syntax-highlighted code.

public Avalonia.Controls.CodeHighlighter Highlighter { get; set; }

LanguageId Property

Gets or sets the language identifier string (e.g. "csharp") for syntax highlighting.

public string LanguageId { get; set; }

Fields

NameDescription
HighlighterPropertyAttached property storing the Avalonia.Controls.CodeHighlighter on a code block. Set by the Avalonia.Controls.Markdown control after document creation.
LanguageIdPropertyDefines the Avalonia.Controls.Documents.MarkdownCodeBlock.LanguageId property.

HighlighterProperty Field

Attached property storing the Avalonia.Controls.CodeHighlighter on a code block. Set by the Avalonia.Controls.Markdown control after document creation.

public Avalonia.StyledProperty<Avalonia.Controls.CodeHighlighter> HighlighterProperty

LanguageIdProperty Field

Defines the Avalonia.Controls.Documents.MarkdownCodeBlock.LanguageId property.

public Avalonia.StyledProperty<string> LanguageIdProperty