ImageInlineDraft Class
Definition
Inline draft for embedded images. The builder inserts an object replacement character (U+FFFC) for the image, giving the resulting Avalonia.Controls.Documents.Serialization.Snapshot.ImageSnapshotNode a length of one.
public class ImageInlineDraft
Constructors
| Name | Description |
|---|---|
| ImageInlineDraft (2 overloads) | No summary available. |
ImageInlineDraft overloads
ImageInlineDraft Constructor
public ImageInlineDraft(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind kind, ReadOnlyMemory<byte> imageData, string imageMimeType, double width, double height, string altText)
Parameters
kind Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind
imageData ReadOnlyMemory<byte>
imageMimeType string
width double
height double
altText string
ImageInlineDraft Constructor
public ImageInlineDraft(ReadOnlyMemory<byte> imageData, string imageMimeType, double width, double height, string altText)
Parameters
imageData ReadOnlyMemory<byte>
imageMimeType string
width double
height double
altText string
Methods
| Name | Description |
|---|---|
| GetFormatMetadata | Inherited from InlineDraft. |
| SetFormatMetadata | Inherited from InlineDraft. |
Properties
| Name | Description |
|---|---|
| AltText | Gets or sets the alternative text describing the image. |
| CustomData | Extension-specific custom data. Transferred to the resulting Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.CustomData during document building. Inherited from InlineDraft. |
| ElementFormatting | Base-level element formatting (font, foreground, background, letter spacing). Inherited from InlineDraft. |
| FormatMetadata | Format-specific metadata for round-trip preservation (e.g. RTF underline variant). Transferred to the resulting Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode during document building. Inherited from InlineDraft. |
| Formatting | Inline-specific formatting (text decorations, baseline alignment). Inherited from InlineDraft. |
| Height | Gets or sets the display height in device-independent pixels. double.NaN uses the intrinsic pixel size. |
| ImageData | Gets or sets the encoded image bytes. |
| ImageMimeType | Gets or sets the MIME type of Avalonia.Controls.Documents.Serialization.Authoring.ImageInlineDraft.ImageData. |
| Inlines | Gets the mutable list of child inline drafts. Inherited from InlineDraft. |
| Kind | Gets the Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind that identifies this draft's inline type. Inherited from InlineDraft. |
| SourceUri | The reference URI for a deferred/linked image (e.g. an image URL), or for an embedded-byte image. When set, Avalonia.Controls.Documents.Serialization.Authoring.ImageInlineDraft.ImageData is typically empty. |
| Width | Gets or sets the display width in device-independent pixels. double.NaN uses the intrinsic pixel size. |
AltText Property
Gets or sets the alternative text describing the image.
public string AltText { get; set; }
Height Property
Gets or sets the display height in device-independent pixels. double.NaN uses the intrinsic pixel size.
public double Height { get; set; }
ImageData Property
Gets or sets the encoded image bytes.
public ReadOnlyMemory<byte> ImageData { get; set; }
ImageMimeType Property
Gets or sets the MIME type of Avalonia.Controls.Documents.Serialization.Authoring.ImageInlineDraft.ImageData.
public string ImageMimeType { get; set; }
SourceUri Property
The reference URI for a deferred/linked image (e.g. an image URL), or for an embedded-byte image. When set, Avalonia.Controls.Documents.Serialization.Authoring.ImageInlineDraft.ImageData is typically empty.
public string SourceUri { get; set; }
Width Property
Gets or sets the display width in device-independent pixels. double.NaN uses the intrinsic pixel size.
public double Width { get; set; }