Hide

YetaWF Documentation

Display
Print

Image Component

Image (Display)

Displays the model as an image. The string specified as image value must have been created/saved using the Image (Edit) component or can be an absolute URL.

Model Type: string

This component supports all image types implemented using the Image Http Handler. This is an extensible class that supports file and data based images.

The model can also specify an absolute URL in which case that URL is used to render the image (without Image Http Handler).

AdditionalMetadata Attributes

NameTypeDefaultDescription
ImageTypestringnullThe image type implementing this image. Specify null if the model defines an absolute URL.
Widthint0The width of the preview image. The aspect ratio of the original image is preserved. Specify 0 if the model defines an absolute URL.
Heightint0The height of the preview image. The aspect ratio of the original image is preserved. Specify 0 if the model defines an absolute URL.
ShowMissingbooltrueDefines whether an image that is not defined displays a "No Image" placeholder (ShowMissing=true, default) or whether no image is displayed (ShowMissing=false). Ignored if the model defines an absolute URL.
LinkToImageboolfalseDefines whether clicking on the image preview will display the image on a new page in its original size (LinkToImage=true). Otherwise, clinking on the image has no effect (LinkToImage=false, default). Ignored if the model defines an absolute URL.
[UIHint("Image"), ReadOnly, AdditionalMetadata("ImageType", VendorImageSupport.ImageType), AdditionalMetadata("Width", Vendor.LogoWidth), AdditionalMetadata("Height", Vendor.LogoHeight)]
public string VendorLogo { get; set; }

Image (Edit)

Allows selection and uploading of an image.

Model Type: string

This component supports all image types implemented using the Image Http Handler. This is an extensible class that supports file and data based images.

AdditionalMetadata Attributes

NameTypeDefaultDescription
ImageTypestringnullThe image type implementing this image. Specify null if the model defines an absolute URL.
Widthint0The width of the preview image. The aspect ratio of the original image is preserved. Specify 0 if the model defines an absolute URL.
Heightint0The height of the preview image. The aspect ratio of the original image is preserved. Specify 0 if the model defines an absolute URL.
ShowMissingbooltrueDefines whether an image that is not defined displays a "No Image" placeholder (ShowMissing=true, default) or whether no image is displayed (ShowMissing=false). Ignored if the model defines an absolute URL.
LinkToImageboolfalseDefines whether clicking on the image preview will display the image on a new page in its original size (LinkToImage=true). Otherwise, clinking on the image has no effect (LinkToImage=false, default). Ignored if the model defines an absolute URL.
[UIHint("Image"), AdditionalMetadata("ImageType", VendorImageSupport.ImageType), AdditionalMetadata("Width", Vendor.LogoWidth), AdditionalMetadata("Height", Vendor.LogoHeight)]
public string VendorLogo { get; set; }