AIChatControl.SetResourceItemTemplate(RenderFragment<AIChatResource>) Method
Specifies the template for an AI resource entry in the resource picker popup.
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<AIChatResource> | The resource item template. |
Remarks
Call the SetResourceItemTemplate method to customize the layout and appearance of an AI resource entry in the resource picker popup.

Example
aiChatControl1.SetResourceItemTemplate(resource => builder => {
builder.OpenComponent<Resource>(0);
builder.AddAttribute(1, "resource", resource);
builder.CloseComponent();
});
The Resource.razor file:
@using Microsoft.AspNetCore.Components.Web
@using DevExpress.AIIntegration.Blazor.Chat
<div class="resource-item">
<div class="resource-name">@resource.Name</div>
<div class="resource-meta">
<span class="resource-type">@resource.MimeType</span>
<span class="resource-desc">@resource.Description</span>
</div>
</div>
@code {
[Parameter]
public AIChatResource resource { get; set; }
}
Refer to the following help topic for additional information: Resources
See Also