Version: 1.0 | 1.1 | 2.0 |

Image

in namespace DotVVM.Framework.Controls.Bootstrap

Renders an image and allows to apply Bootstrap CSS classes.

Properties

Name Type Description Notes Default Value
AlternateText String Gets or sets the alternate text of the image.
attribute
inner element
static value
bindable
default
Height String Gets or sets the height of the image.
attribute
inner element
static value
bindable
default
ImageUrl String Gets or sets the URL of the image.
attribute
inner element
static value
bindable
default
ToolTip String Gets or sets the tool tip text of the image.
attribute
inner element
static value
bindable
default
Type ImageType Gets or sets the type of the image - e.g. rounded, circle, responsive etc.
attribute
inner element
static value
bindable
default
Default
Width String Gets or sets the width of the image.
attribute
inner element
static value
bindable
default

Events

Name Type Description

Usage & Scenarios

Renders an image and allows to apply Bootstrap CSS classes - e.g. rounded corners, circle crop etc.

HTML Rendered by the Control

Sample 1: Basic Image

The most important property is the ImageUrl which sets the src attribute of the rendered image.

The Image control has the ToolTip, AlternateText, Width and Height properties which set the title, alt, width and a height of the image. The width and height is applied using inline CSS styles.

<bs:Image ImageUrl="~/Images/LA.jpg" AlternateText="Los Angeles" 
          Height="50%" Width="50%" />

Sample 2: Image Types

The Type property specifies which type of the image should be rendered.

The available types are:

  • Default
  • Thumbnail
  • Responsive
  • Rounded
  • Circle
<bs:Image ImageUrl="~/Images/LA.jpg" AlternateText="Los Angeles" />
<br/>
<bs:Image ImageUrl="~/Images/LA.jpg" AlternateText="Los Angeles" Type="Thumbnail" />
<br/>
<bs:Image ImageUrl="~/Images/LA.jpg" AlternateText="Los Angeles" Type="Responsive" />
<br/>
<bs:Image ImageUrl="~/Images/LA.jpg" AlternateText="Los Angeles" Type="Rounded" />
<br/>
<bs:Image ImageUrl="~/Images/LA.jpg" AlternateText="Los Angeles" Type="Circle" />

Suggestions


Help & Contribute

The documentation is maintained on GitHub.
We'll be happy if you edit the page and create a pull request.

Send message