ChatFactory
Creates the data items and visual elements used to represent RadChat messages and actions.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class ChatFactory
Inheritance: objectChatFactory
Constructors
public ChatFactory()
Methods
Creates the built-in visual element corresponding to a supported chat card data item.
public virtual BaseChatCardElement CreateCardElement(BaseChatCardDataItem cardDataItem)
An instance whose runtime type is exactly ChatFlightCardDataItem, ChatImageCardDataItem, ChatProductCardDataItem, or ChatWeatherCardDataItem.
Returns:The matching card element, or null when the data item's type has no built-in mapping.
The built-in mappings use exact runtime-type checks; derived or custom card data-item types require an override.
Creates the data-item adapter for a supported chat message.
public virtual BaseChatDataItem CreateDataItem(ChatMessage message)
The message to adapt.
Returns:The matching data item, or null when the message type has no built-in mapping.
The built-in mapping accepts instances of the supported message types, including derived types.
Creates the standard virtualized item element for a supported chat data-item type.
public virtual BaseChatItemElement CreateItemElement(BaseChatDataItem item)
The data item whose message visual is being created.
Returns:The matching item element, or null when no built-in mapping exists.
The built-in mapping uses assignability for AIChatMessageDataItem and exact runtime types for the other supported data items.
Creates the standard visual element for a suggested action.
public virtual SuggestedActionElement CreateSuggestedActionElement(SuggestedActionDataItem item)
The suggested-action data represented by the element.
Returns:A suggested-action element bound to item.
Creates the standard visual element for a toolbar action.
public virtual ToolbarActionElement CreateToolbarActionElement(ToolbarActionDataItem item)
The toolbar action data represented by the element.
Returns:A toolbar action element bound to item.