1using System.Threading.Tasks;
21 : base(Document, Parent)
28 public override string LocalName =>
"ImageInternal";
36 set => this.cid = value;
43 public override Task
FromXml(XmlElement Input)
46 return base.FromXml(Input);
55 base.ExportAttributes(Output);
77 base.CopyContents(Destination);
91 string ContentId = await this.cid.Evaluate(State.
Session,
string.Empty);
92 if (!
string.IsNullOrEmpty(ContentId) &&
94 Content is SKImage
Image)
108 base.ExportStateAttributes(Output);
Contains a 2D layout document.
bool TryGetContent(string ContentId, out object Content)
Tries to get content from attached content.
void Export(XmlWriter Output)
Exports the attribute.
void ExportState(XmlWriter Output)
Exports the state of the attribute.
StringAttribute CopyIfNotPreset(Layout2DDocument ForDocument)
Copies the attribute object if undefined, or defined by an expression. Returns a reference to itself,...
Variables Session
Current session.
Abstract base class for images.
An image provided by the caller, identified by a content id.
StringAttribute CidAttribute
Content ID
override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
Creates a new instance of the layout element.
override void ExportAttributes(XmlWriter Output)
Exports attributes to XML.
ImageInternal(Layout2DDocument Document, ILayoutElement Parent)
An image provided by the caller, identified by a content id.
override Task FromXml(XmlElement Input)
Populates the element (including children) with information from its XML definition.
override void ExportStateAttributes(XmlWriter Output)
Exports the local attributes of the current element.
override async Task< SKImage > LoadImage(DrawingState State)
Loads the image defined by the element.
override string LocalName
Local name of type of element.
override void CopyContents(ILayoutElement Destination)
Copies contents (attributes and children) to the destination element.
Layout2DDocument Document
Layout document.
Base interface for all layout elements.
Layout2DDocument Document
Layout document.