MarkdownTextBlock Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An efficient and extensible control that can parse and render markdown.
public class MarkdownTextBlock : Windows.UI.Xaml.Controls.Control, Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Render.ICodeBlockResolver, Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Render.IImageResolver, Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Render.ILinkRegister
type MarkdownTextBlock = class
inherit Control
interface ILinkRegister
interface IImageResolver
interface ICodeBlockResolver
Public Class MarkdownTextBlock
Inherits Control
Implements ICodeBlockResolver, IImageResolver, ILinkRegister
- Inheritance
-
Windows.UI.Xaml.Controls.ControlMarkdownTextBlock
- Implements
Constructors
MarkdownTextBlock() |
Initializes a new instance of the MarkdownTextBlock class. |
Fields
Properties
CodeBackground |
Gets or sets the brush used to fill the background of a code block. |
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 |
CodeForeground |
Gets or sets the brush used to render the text inside a code block. If this is
|
CodeMargin |
Gets or sets the space between the code border and the text. |
CodePadding |
Gets or sets space between the code border and the text. |
CodeStyling |
Gets or sets the Default Code Styling for Code Blocks. |
EmojiFontFamily |
Gets or sets the font used to display emojis. If this is |
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 |
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. |
ImageStretch |
Gets or sets the stretch used for images. |
InlineCodeBackground |
Gets or sets the background brush for inline code. |
InlineCodeBorderBrush |
Gets or sets the border brush for inline code. |
InlineCodeBorderThickness |
Gets or sets the thickness of the border for inline code. |
InlineCodeFontFamily |
Gets or sets the font used to display code. If this is |
InlineCodeForeground |
Gets or sets the foreground brush for inline code. |
InlineCodeMargin |
Gets or sets the margin for 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
|
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. |
ParagraphLineHeight |
Gets or sets the line hegiht 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 |
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
|
QuoteMargin |
Gets or sets the space outside of quote borders. |
QuotePadding |
Gets or sets the space between the quote border and the text. |
SchemeList |
Gets or sets the SchemeList. |
TableBorderBrush |
Gets or sets the brush used to render table borders. If this is |
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. |
Text |
Gets or sets the markdown text to display. |
TextWrapping |
Gets or sets the word wrapping behavior. |
UriPrefix |
Gets or sets the Prefix of Uri. |
UseSyntaxHighlighting |
Gets or sets a value indicating whether to use Syntax Highlighting on Code. |
WrapCodeBlock |
Gets or sets a value indicating whether to Wrap the Code Block or use a Horizontal Scroll. |
YamlBorderBrush |
Gets or sets the brush used to render yaml borders. If this is |
YamlBorderThickness |
Gets or sets the thickness of any yaml header borders. |
Methods
OnApplyTemplate() | Windows.UI.Xaml.Controls.Control.OnApplyTemplate |
RegisterNewHyperLink(Hyperlink, String) |
Called when the render has a link we need to listen to. |
RegisterNewHyperLink(Image, String, Boolean) |
Called when the render has a link we need to listen to. |
SetRenderer<T>() |
Sets the Markdown Renderer for Rendering the UI. |
Events
CodeBlockResolving |
Fired when a Code Block is being Rendered. The default implementation is to output the CodeBlock as Plain Text. You must set Handled to true in order to process your changes. |
ImageClicked |
Fired when an image element in the markdown was tapped. |
ImageResolving |
Fired when an image from the markdown document needs to be resolved.
The default implementation is basically |
LinkClicked |
Fired when a link element in the markdown was tapped. |
MarkdownRendered |
Fired when the text is done parsing and formatting. Fires each time the markdown is rendered. |
Explicit Interface Implementations
ICodeBlockResolver.ParseSyntax(InlineCollection, String, String) |
Called when a Code Block is being rendered. |
IImageResolver.ResolveImageAsync(String, String) |
Called when the renderer needs to display a image. |