MarkdownImage Class
Definition
A Avalonia.Controls.Documents.RichInlineUIContainer that represents an image in a Markdown document. Carries the image URL and title so the render layer can load the image when an Avalonia.Controls.Documents.MarkdownImage.ImageLoader is available.
public class MarkdownImage
Remarks
The Avalonia.Controls.Documents.MarkdownImage.ImageLoader is typically set via an Avalonia style, mirroring how Avalonia.Controls.Documents.MarkdownCodeBlock.Highlighter is configured:
<Style Selector="MarkdownImage">
<Setter Property="ImageLoader" Value="{StaticResource myLoader}"/>
</Style>
Image loading is deferred until both Avalonia.Controls.Documents.MarkdownImage.ImageSource and Avalonia.Controls.Documents.MarkdownImage.ImageLoader are available. This avoids coupling the snapshot renderer to the image loader.
Constructors
| Name | Description |
|---|---|
| MarkdownImage | No summary available. |
MarkdownImage Constructor
public MarkdownImage()
Properties
| Name | Description |
|---|---|
| ImageLoader | Gets or sets the image loader used to resolve the image URL. |
| ImageSource | Gets or sets the image URL. |
| ImageTitle | Gets or sets the image title (used as tooltip). |
ImageLoader Property
Gets or sets the image loader used to resolve the image URL.
public Avalonia.Controls.MarkdownImageLoader ImageLoader { get; set; }
ImageSource Property
Gets or sets the image URL.
public string ImageSource { get; set; }
ImageTitle Property
Gets or sets the image title (used as tooltip).
public string ImageTitle { get; set; }
Fields
| Name | Description |
|---|---|
| ImageLoaderProperty | Defines the Avalonia.Controls.Documents.MarkdownImage.ImageLoader property. |
| ImageSourceProperty | Defines the Avalonia.Controls.Documents.MarkdownImage.ImageSource property. |
| ImageTitleProperty | Defines the Avalonia.Controls.Documents.MarkdownImage.ImageTitle property. |
ImageLoaderProperty Field
Defines the Avalonia.Controls.Documents.MarkdownImage.ImageLoader property.
public Avalonia.StyledProperty<Avalonia.Controls.MarkdownImageLoader> ImageLoaderProperty
ImageSourceProperty Field
Defines the Avalonia.Controls.Documents.MarkdownImage.ImageSource property.
public Avalonia.StyledProperty<string> ImageSourceProperty
ImageTitleProperty Field
Defines the Avalonia.Controls.Documents.MarkdownImage.ImageTitle property.
public Avalonia.StyledProperty<string> ImageTitleProperty