Cards
RadChat offers different cards to display data in a structured layout. Thus, the visually ordered information is easier to digest for the user. In addition, it may respond to users' action.
Depending on the information that is presented, the cards can be one of the following types:
ChatImageCardElement
ChatImageCardElement illustrates an image and several fields with additional information. It resembles a business card.
Figure 1: ChatImageCardElement
Adding a ChatImageCardElement programmatically
Chat Product Card Element
ChatProductCardElement illustrates an image and several fields with additional information. It resembles a product brochure.
Figure 2: ChatProductCardElement
Adding a ChatProductCardElement programmatically
ChatWeatherCardElement
ChatWeatherCardElement illustrates a simple weather forecast.
Figure 3: ChatWeatherCardElement
Adding a ChatWeatherCardElement programmatically
ChatFlightCardElement
ChatFlightCardElement illustrates flights' information in a structured and user-friendly layout.
Figure 4: ChatFlightCardElement
Adding a ChatFlightCardElement programmatically
The above examples demonstrates how to add the different card types in a simple ChatCardMessage. RadChat offers ChatCarouselMessage which allows adding and visualizing multiple card elements. Additional information is available in the Messages help article.
Figure 5: ChatCarouselMessage
Card Actions
Each card allows you to add a certain action that can be handled:
Adding ChatCardActions
The RadChat.CardActionClicked event is fired once a user clicks on the action's text. The CardActionEventArgs gives you access to the ChatCardAction and user's data.
Handling ChatCardActions
Figure 6: Handling ChatCardActions