Renders a Markdig Markdig.Syntax.MarkdownDocument into an Avalonia control tree.
public class AvaloniaRenderer : RendererBase, IMarkdownRenderer
kind:method, kind:property, kind:ctor. Press Esc to clear.AnchorsMaps anchor IDs to their heading controls for fragment link navigation.ApplyAttributeClassesWhen true, the classes Markdig attaches to an element ({.name} with Markdig's UseGenericAttributes()) are added to the Avalonia.StyledElement.Classes of the control or inline rendered for it, so they can be targeted by styles. MarkdownViewer turns this on when its pipeline uses generic attributes.AreHeadingsFoldableWhen true, each heading starts with a fold button that hides or shows its section: the blocks that follow it up to the next heading of the same or a higher level. Sections start expanded. Defaults to false.AreTaskListsInteractiveWhen true, task-list items render a clickable checkbox that raises TaskToggled when toggled; otherwise a static check glyph. Defaults to false.BaseUriOptional base URI for resolving relative image and link paths.CodeBlockMaxHeightThe maximum height of a code block (toolbar excluded); a taller block scrolls vertically inside itself. Defaults to (no limit).CodeHighlighterOptional syntax highlighter used by TextMateCodeBlockRenderer. Set by Register(AvaloniaRenderer) implementations.DetectTextDirectionWhen true, each block takes the Avalonia.Visual.FlowDirection of its own text, as HTML's dir="auto" does: a paragraph, heading, list, quote or table whose first letter is Hebrew or Arabic is laid out right to left, one whose first letter is Latin left to right. A block without a letter (only digits or symbols) keeps the direction around it. Code blocks are always left to right, and an HTML dir attribute (<div dir="rtl">, <p dir="rtl">) wins over the text. When false, blocks keep the direction of the control that shows the document. Defaults to true.HeadingEntriesDocument-ordered list of headings encountered during the last render pass (level, plain text, anchor slug), used to build TableOfContents. Reset on each render.ImageLoadersOrdered list of image loaders. The last entry is always the built-in MarkView.Avalonia.Extensions.BitmapImageLoader which handles avares://, http/https, and data URIs for bitmap formats. Extensions insert at index 0 to take priority.ImageResizeModeControls how images without an explicit "=WxH" size hint are scaled. Defaults to ScaleDownToFit.IsLazyRenderingEnabledWhen true, costly content waits until its element first comes within one viewport height of the visible area (see RunWhenNearViewport(Control, Action)): images start loading (unless already cached), formulas and Mermaid diagrams render, and code blocks, shown as plain text until then, get their colours. When false, formulas and colours are built during Markdig.Renderers.RendererBase.Render(Markdig.Syntax.MarkdownObject), and images and diagrams start as soon as their element is attached to a visual tree. Defaults to false, since the output of a renderer may never be laid out in a viewport; MarkdownViewer turns it on from its IsLazyRenderingEnabled.IsStreamingtrue while a streaming session renders the document, which may end in the middle of a block. Renderers can consult IsProvisional(MarkdownObject) to render the blocks that contain the end of the text so far differently.ProvisionalStartThe source position where the block that contains the end of the text starts (the deepest last block of the document), or when no block does: outside a session, on the final update, or when a blank line follows the last block. Every block whose span ends at or after it contains the end of the text. Read by IsProvisional(MarkdownObject) while IsStreaming is true.RootPanelThe root panel that contains all rendered block-level elements.ShowCodeBlockCopyButtonWhether code blocks show a button in a toolbar above the code that copies the code to the clipboard. Defaults to true.ShowCodeBlockLanguageWhether code blocks show their language (the info string of a fenced code block) in a toolbar above the code. Defaults to false.ShowCodeBlockLineNumbersWhether code blocks show the number of each line in a gutter next to the code. The numbers are not part of the code: text selection and the copy button never include them. Defaults to false.SlugGeneratorGenerates GitHub-style anchor IDs for headings. Reset on each render pass.WrapCodeBlockLinesWhether code blocks wrap lines longer than the block's width instead of letting them run past it. Defaults to false.ApplyTheme(StyledElement, String)Gives element the control theme with the resource key resourceKey, such as MarkdownCodeBlockTheme, so that a renderer's own control looks like the built-in one it stands for. The built-in look of the document's controls comes from these themes, not from styles on their markdown-* classes. A key that no theme defines yet gives an empty theme, which the viewer replaces once one does. Replaces the theme the control's type would otherwise get, so it is meant for plain panels, borders, text blocks and inlines.IsProvisional(MarkdownObject)True during a session for an object that contains the end of the text so far: the last leaf block and every block around it, those whose span ends at or after ProvisionalStart; an inline is judged by its leaf block (ContainerInline.ParentBlock), and is never provisional outside one. Always false when IsStreaming is false, so renderers can call it unconditionally.LoadRenderers()Registers all built-in object renderers. Override to customize.Pop()Pops the top container from the stack.Push(InlineCollection)Pushes an inline collection as an inline container onto the stack.Push(Panel)Pushes a panel as a block container onto the stack.RegisterAnchor(String, Control)Registers a heading control under the given anchor ID.RegisterHeading(Int32, String, String)Records a heading's level, plain text, and anchor slug in document order.ReplaceOrAdd<TRenderer>(IMarkdownObjectRenderer)Removes the first registered renderer of type TRenderer and adds replacement at the end of the list. If none exists, simply adds replacement.ResolveUrl(String)Resolves a URL against the BaseUri if set and the URL is relative. The fragment part (everything from # onward) is split off before combining with the base URI so that # is never percent-encoded to %23.WriteBlock(Control)Adds a block-level control to the current block container.WriteInline(Control)Adds a control wrapped in InlineUIContainer to the current inline container.WriteInline(Inline)Adds an inline to the current inline container.WriteLeafInline(LeafBlock)Writes all inlines of a leaf block (paragraph, heading, etc.) into the current inline container.WriteLeafRawLines(LeafBlock)Writes the raw text lines of a leaf block (code blocks), as one Run.LinkClickedRaised when a hyperlink is clicked.TaskToggledRaised when the user toggles a task-list checkbox (see AreTaskListsInteractive). Positions refer to the text the rendered document was parsed from.