Edit

Share via


MarkdownRenderer Class

Definition

Block UI Methods for UWP UI Creation.

public class MarkdownRenderer : Microsoft.Toolkit.Parsers.Markdown.Render.MarkdownRendererBase
type MarkdownRenderer = class
    inherit MarkdownRendererBase
Public Class MarkdownRenderer
Inherits MarkdownRendererBase
Inheritance
MarkdownRenderer

Constructors

MarkdownRenderer(MarkdownDocument, ILinkRegister, IImageResolver, ICodeBlockResolver)

Initializes a new instance of the MarkdownRenderer class.

Properties

Background

Gets or sets a brush that provides the background of the control.

BorderBrush

Gets or sets a brush that describes the border fill of a control.

BorderThickness

Gets or sets the border thickness of a control.

CharacterSpacing

Gets or sets the uniform spacing between characters, in units of 1/1000 of an em.

CodeBackground

Gets or sets the brush used to fill the background of a code block.

CodeBlockResolver

Gets the Parser to parse code strings into Syntax Highlighted text.

CodeBorderBrush

Gets or sets the brush used to render the border fill of a code block.

CodeBorderThickness

Gets or sets the thickness of the border around code blocks.

CodeFontFamily

Gets or sets the font used to display code. If this is null, then FontFamily is used.

CodeForeground

Gets or sets the brush used to render the text inside a code block. If this is null, then Foreground is used.

CodeMargin

Gets or sets the space outside of code blocks.

CodePadding

Gets or sets the space between the code border and the text.

DefaultEmojiFont

Gets the Default Emoji Font.

Document

Gets the markdown document that will be rendered.

(Inherited from MarkdownRendererBase)
EmojiFontFamily

Gets or sets the font used to display emojis. If this is null, then Segoe UI Emoji font is used.

FlowDirection

Gets or sets the FlowDirection of the markdown.

FontFamily

Gets or sets the font used to display text in the control.

FontSize

Gets or sets the size of the text in this control.

FontStretch

Gets or sets the degree to which a font is condensed or expanded on the screen.

FontStyle

Gets or sets the style in which the text is rendered.

FontWeight

Gets or sets the thickness of the specified font.

Foreground

Gets or sets a brush that describes the foreground color.

Header1FontSize

Gets or sets the font size for level 1 headers.

Header1FontWeight

Gets or sets the font weight to use for level 1 headers.

Header1Foreground

Gets or sets the foreground brush for level 1 headers.

Header1Margin

Gets or sets the margin for level 1 headers.

Header2FontSize

Gets or sets the font size for level 2 headers.

Header2FontWeight

Gets or sets the font weight to use for level 2 headers.

Header2Foreground

Gets or sets the foreground brush for level 2 headers.

Header2Margin

Gets or sets the margin for level 2 headers.

Header3FontSize

Gets or sets the font size for level 3 headers.

Header3FontWeight

Gets or sets the font weight to use for level 3 headers.

Header3Foreground

Gets or sets the foreground brush for level 3 headers.

Header3Margin

Gets or sets the margin for level 3 headers.

Header4FontSize

Gets or sets the font size for level 4 headers.

Header4FontWeight

Gets or sets the font weight to use for level 4 headers.

Header4Foreground

Gets or sets the foreground brush for level 4 headers.

Header4Margin

Gets or sets the margin for level 4 headers.

Header5FontSize

Gets or sets the font size for level 5 headers.

Header5FontWeight

Gets or sets the font weight to use for level 5 headers.

Header5Foreground

Gets or sets the foreground brush for level 5 headers.

Header5Margin

Gets or sets the margin for level 5 headers.

Header6FontSize

Gets or sets the font size for level 6 headers.

Header6FontWeight

Gets or sets the font weight to use for level 6 headers.

Header6Foreground

Gets or sets the foreground brush for level 6 headers.

Header6Margin

Gets or sets the margin for level 6 headers.

HorizontalRuleBrush

Gets or sets the brush used to render a horizontal rule. If this is null, then Foreground is used.

HorizontalRuleMargin

Gets or sets the margin used for horizontal rules.

HorizontalRuleThickness

Gets or sets the vertical thickness of the horizontal rule.

ImageMaxHeight

Gets or sets the MaxHeight for images.

ImageMaxWidth

Gets or sets the MaxWidth for images.

ImageResolver

Gets the interface that is used to resolve images.

ImageStretch

Gets or sets the stretch used for images.

InlineCodeBackground

Gets or sets the brush used to fill the background of inline code.

InlineCodeBorderBrush

Gets or sets the brush used to fill the border of inline code.

InlineCodeBorderThickness

Gets or sets the thickness of the border around inline code.

InlineCodeFontFamily

Gets or sets the font used to display code. If this is null, then FontFamily is used.

InlineCodeForeground

Gets or sets the brush used to fill the foreground of inline code.

InlineCodeMargin

Gets or sets the margin of inline code.

InlineCodePadding

Gets or sets the space between the code border and the text.

IsTextSelectionEnabled

Gets or sets a value indicating whether text selection is enabled.

LinkForeground

Gets or sets the brush used to render links. If this is null, then Foreground is used.

LinkRegister

Gets the interface that is used to register hyperlinks.

ListBulletSpacing

Gets or sets the space between the list item bullets/numbers and the list item content.

ListGutterWidth

Gets or sets the width of the space used by list item bullets/numbers.

ListMargin

Gets or sets the margin used by lists.

Padding

Gets or sets the distance between the border and its child object.

ParagraphLineHeight

Gets or sets the line height used for paragraphs.

ParagraphMargin

Gets or sets the margin used for paragraphs.

QuoteBackground

Gets or sets the brush used to fill the background of a quote block.

QuoteBorderBrush

Gets or sets the brush used to render a quote border. If this is null, then Foreground is used.

QuoteBorderThickness

Gets or sets the thickness of quote borders.

QuoteForeground

Gets or sets the brush used to render the text inside a quote block. If this is null, then Foreground is used.

QuoteMargin

Gets or sets the space outside of quote borders.

QuotePadding

Gets or sets the space between the quote border and the text.

TableBorderBrush

Gets or sets the brush used to render table borders. If this is null, then Foreground is used.

TableBorderThickness

Gets or sets the thickness of any table borders.

TableCellPadding

Gets or sets the padding inside each cell.

TableMargin

Gets or sets the margin used by tables.

TextWrapping

Gets or sets the word wrapping behavior.

WrapCodeBlock

Gets or sets a value indicating whether to wrap text in the Code Block, or use Horizontal Scroll.

YamlBorderBrush

Gets or sets the brush used to render table borders. If this is null, then Foreground is used.

YamlBorderThickness

Gets or sets the thickness of any yaml header borders.

Methods

AlterChildRuns(Span, Action<Span,Run>)

Performs an action against any runs that occur within the given span.

CheckRenderMarkdownLink(MarkdownLinkInline, IRenderContext)

Verifies if the link is valid, before processing into a link, or plain text.

(Inherited from MarkdownRendererBase)
CollapseWhitespace(IRenderContext, String)

Removes leading whitespace, but only if this is the first run in the block.

(Inherited from MarkdownRendererBase)
CreateOrReuseRichTextBlock(IRenderContext)

Creates a new RichTextBlock, if the last element of the provided collection isn't already a RichTextBlock.

CreateTextBlock(RenderContext)

Creates a new TextBlock, with default settings.

Render()

Called externally to render markdown to a text block.

Render(IRenderContext)

Renders all Content to the Provided Parent UI.

(Inherited from MarkdownRendererBase)
RenderBlock(MarkdownBlock, IRenderContext)

Called to render a block element.

(Inherited from MarkdownRendererBase)
RenderBlocks(IEnumerable<MarkdownBlock>, IRenderContext)

Renders a list of block elements.

RenderBoldRun(BoldTextInline, IRenderContext)

Renders a bold run element.

RenderCode(CodeBlock, IRenderContext)

Renders a code element.

RenderCodeRun(CodeInline, IRenderContext)

Renders a code element

RenderEmoji(EmojiInline, IRenderContext)

Renders emoji element.

RenderHeader(HeaderBlock, IRenderContext)

Renders a header element.

RenderHorizontalRule(IRenderContext)

Renders a horizontal rule element.

RenderHyperlink(HyperlinkInline, IRenderContext)

Renders a raw link element.

RenderImage(ImageInline, IRenderContext)

Renders an image element.

RenderInline(MarkdownInline, IRenderContext)

Called to render an inline element.

(Inherited from MarkdownRendererBase)
RenderInlineChildren(IList<MarkdownInline>, IRenderContext)

Renders all of the children for the given element.

(Inherited from MarkdownRendererBase)
RenderItalicRun(ItalicTextInline, IRenderContext)

Renders a text run element.

RenderListElement(ListBlock, IRenderContext)

Renders a list element.

RenderMarkdownLink(MarkdownLinkInline, IRenderContext)

Renders a link element

RenderParagraph(ParagraphBlock, IRenderContext)

Renders a paragraph element.

RenderQuote(QuoteBlock, IRenderContext)

Renders a quote element.

RenderStrikethroughRun(StrikethroughTextInline, IRenderContext)

Renders a strikethrough element.

RenderSubscriptRun(SubscriptTextInline, IRenderContext)

Renders a subscript element.

RenderSuperscriptRun(SuperscriptTextInline, IRenderContext)

Renders a superscript element.

RenderTable(TableBlock, IRenderContext)

Renders a table element.

RenderTextRun(TextRunInline, IRenderContext)

Renders a text run element.

RenderYamlHeader(YamlHeaderBlock, IRenderContext)

Renders a yaml header element.

Applies to