CardImage

in namespace DotVVM.Framework.Controls.Bootstrap4

Usage & Scenarios

Renders an image content inside the Card control.

https://getbootstrap.com/docs/4.3/components/card/

Sample 1: Basic CardImage

Use the ImageUrl property to provide URL of the image to be displayed.

You may use AlternateText and ToolTip properties to provide alt and title attributes to the image.

<bs:Card>
  <bs:CardImage
      ImageUrl="~/Images/la.jpg"
      AlternateText="Los Angeles"
      ToolTip="Los Angeles" />
</bs:Card>

Sample 2: Textual Overlay

If you need to overlay the image with text, you can use CardBody control inside the CardImage.

<bs:Card>
  <bs:CardImage
      ImageUrl="~/Images/la.jpg"
      AlternateText="Los Angeles"
      ToolTip="Los Angeles">
    <bs:CardBody 
        TitleText="Main title"
        SubtitleText="Secondary title"
        Text="Body of the card" />
  </bs:CardImage>
</bs:Card>

Properties

Name Type Description Notes Default Value
property icon AlternateText String Gets or sets the alternate text of the image.
attribute
inner element
static value
bindable
default
null
property icon Height String Gets or sets the height of the image.
attribute
inner element
static value
bindable
default
null
property icon ImageUrl String Gets or sets the URL of the image.
attribute
inner element
static value
bindable
default
null
property icon Overlay CardBody Gets or sets card body which overlays image
attribute
inner element
static value
bindable
default
null
property icon ToolTip String Gets or sets the tool tip text of the image.
attribute
inner element
static value
bindable
default
property icon Width String Gets or sets the width of the image.
attribute
inner element
static value
bindable
default
null

HTML produced by the control