-
Couldn't load subscription status.
- Fork 1.4k
Description
Images as hyperlinks
Main topic is support for images in hyperlinks. Currently there is a limitation in HyperlinkButton that no InlineUIContainer can be added as content.
There already are some issues that touched up this issue:
- 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 (...)"
Solution suggestion
It's quite common to have an image linking to something, be it a badge in readme or a miniature with link to full-res version. We could only support at least that scenario (so the only content of hyperlink is an image) or go the extra mile and expand support for mixed content.
The solution would be a kind of a workaround, as when we'd discover a non-text content in Hyperlink we'd fallback to using InlineUIContainer instead of HyperlinkTextBlock, and make any non-text element respond to click as-if-uri-activated, and text would be just parsed into HyperlinkButtons inside.