botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[Question] Make size of the image in Hero/Thumbnail card configurable?

Open singhsurya opened this issue 9 years ago • 1 comments

Bot Info

  • Bot handle: Virtual Assistant
  • App ID:
  • SDK Platform: .NET
  • SDK Version: 3.8
  • Active Channels: WebChat
  • Deployment Environment: Azure

Issue Description

Size of the image in Hero and Thumbnail card cannot be set to max-width max-height etc. If the image is large then it gets spill over.

Code Example

var heroCard = new HeroCard { Title = title, Subtitle = subtitle, Text = text, Images = new List() { cardImage }, Buttons = new List() { cardAction }, };

Reproduction Steps

  1. Get two images of different in size and create two hero cards
  2. Place these two hero cards in a Carousel card
  3. The Hero card size will be different for both the images in Carousel tray

Expected Behavior

If there would have a max-width and max-height feature in the card then we could set that to make the card sizes equal.

Actual Results

Card sizes are different which makes the Carousel a bit asymmetrical.

singhsurya avatar Oct 12 '17 07:10 singhsurya

@singhsurya The Hero Card and Thumbnail Card are basic card templates that are not really designed for this level of customization.

For custom card layout and design, use the Adaptive Cards JSON schema. This way you can create card designs that meet your exact specifications.

For more information, see:

  • https://docs.microsoft.com/en-us/adaptive-cards/
  • http://adaptivecards.io/visualizer/
  • http://adaptivecards.io/samples/

nwhitmont avatar Oct 13 '17 17:10 nwhitmont