Of course, there's the capability of displaying images. In this release, images lack of the expected alignment features to behave just as expected on an HTML context, but they will do just fine for inline contexts, tables and some others.
Inserting images
We all know that the
src
attribute of theimg
HTML tag can be a relative or absolute path to an image on the same or any other server. Here things are slightly different. Images can come from other sources:
- File Paths: If you place a path to a file, the Renderer will try to load it using
Image.FromFile
- Static Properties: Obtains the image from a static property that returns an
Image
object- Static Methods: Obtains the image from a static method that takes no arguments and returns an
Image
For static properties, you must write
propety:
before the full name to the property. For static methods you must precede the path of the method withmethod:
For example, if your namespace is
Company.Namespace
, and the class where the property resides is calledImages
with a property that returns the image calledImageProperty
, thesrc
attribute for the image would look like this.
src = "property:Company.Namespace.Images.ImageProperty"
Or the same case, but with a method name
ImageMethod
src = "method:Company.Namespace.Images.ImageMethod"
Positioning Images
You can use Images anyway you like, apply borders margin and padding as for any other box.
Some examples of image positioning:
Just an image: Image with border and background: Stretched Image: Huge padding and border: Image in line with the text