AIChatControl.SetEmptyMessageAreaTemplate(RenderFragment) Method
Specifies the template that customizes the message area when the chat has no message history.
Namespace: DevExpress.AIIntegration.WinForms.Chat
Assembly: DevExpress.AIIntegration.WinForms.Chat.v26.1.dll
NuGet Package: DevExpress.AIIntegration.WinForms.Chat
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| template | RenderFragment | The empty message area template. |
Remarks
You can modify the text or template displayed in the message area when a chat has yet to start.
Use one of the following members:
- EmptyStateText - Specifies the empty area message.
SetEmptyMessageAreaTemplate- Specifies a template (RenderFragment) that customizes the empty area.
Note
If you specify both the EmptyStateText property and this template, the chat control uses the template and ignores the EmptyStateText property.
Example
The following example customizes the empty message area:

aiChatControl1.SetEmptyMessageAreaTemplate(builder => {
builder.OpenComponent<EmptyArea>(0);
builder.CloseComponent();
});
The EmptyArea.razor file:
<style>
.demo-chat-ui-description {
font-weight: bold;
font-size: 20px;
text-align: center;
}
</style>
<div class="demo-chat-ui-description">
AI Assistant is ready to answer your questions.
</div>
Refer to the following help topic for additional information: AI Chat Control