Issues on topic:
- Images are not fitting (...) (added ImageStretch, stated Hyperlink doesn't support InlineUIContainers)
- v1.4 broke what works in v1.3.1 (discussion that local refs are not supported and also Hyperlink no-image limitation)
- commit fixing above where we observe the limitation on image links
- statement "we already support images and links (...)"
Suggestions:
-
support images in hyperlinks by a kind of a workaround: when image (or possibly anything that also can't be displayed in Hyperlink) is discovered we fallback to an InlineUIContainer with HyperlinkButton-wrapped Image
-
support an extensibility scenario to plug into Rendering operation between parsing and rendering, like an event MarkdownParsed with a MarkdownDocument property invoked after parse: MarkdownTextBlock.RenderMarkdown() (line 1090)
That'd allow developers to plug into parsing operation and possibly modify the
ImageInline.Url
properties. I think it'd be much more convenient to operate on already parsed, strongly typed tree (which would also have to be exposed as public) than reparsing markdown before handing it over to MarkdownTextBlock.There are other approaches like making a callback property invoked for every link, but that'd be very specialized, or providing a direct property for MarkdownDocument in MarkdownTextBlock but that would most probably require a big amount of work for the whole link relay system already implemented.
-
enhancement suggestion: reparse text only if Text property changes on MarkdownTextBlock - otherwise only re-render (of course "only" is rather a bad term, as UI creation is much heavier).