DxAIChat.MessageContentTemplate Property
Specifies a template used to display message bubble content.
Namespace: DevExpress.AIIntegration.Blazor.Chat
Assembly: DevExpress.AIIntegration.Blazor.Chat.v24.2.dll
NuGet Package: DevExpress.AIIntegration.Blazor.Chat
Declaration
[Parameter]
public RenderFragment<BlazorChatMessage> MessageContentTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<BlazorChatMessage> | The content of a message bubble. |
Remarks
Use the MessageContentTemplate
property to display any render fragment in a message bubble. This template does not affect the default bubble rendering, such as paddings or inner content alignment.
The MessageContentTemplate
accepts a BlazorChatMessage object as the context
parameter.
<DxAIChat CssClass="demo-chat">
<MessageContentTemplate>
<div class="demo-chat-content">
@context.Content
</div>
</MessageContentTemplate>
</DxAIChat>
.demo-chat {
width: 100%;
height: 400px;
}
.demo-chat .demo-chat-content {
font-style: italic;
}
See Also