Class ResponseToolbar
Gets or sets the response toolbar component within an SfAIAssistView, hosting toolbar items alongside the response area.
Inherited Members
Namespace: Syncfusion.Blazor.InteractiveChat
Assembly: Syncfusion.Blazor.dll
Syntax
public class ResponseToolbar : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
Use Width to specify the toolbar’s rendered width and ItemClicked to handle user clicks on the toolbar items.
Examples
The following example shows how to configure a ResponseToolbar with toolbar items and handle the ItemClicked event:
@using Syncfusion.Blazor.InteractiveChat
<SfAIAssistView>
<AssistViews>
<AssistView Header="AI Assistant">
<ResponseToolbar Width="300px" ItemClicked="OnResponseItemClick">
<ResponseToolbarItem IconCss="e-icons e-download"></ResponseToolbarItem>
<ResponseToolbarItem IconCss = "e-icons e-refresh" ></ ResponseToolbarItem >
</ResponseToolbar>
</AssistView>
</AssistViews>
</SfAIAssistView>
@code {
private Task OnResponseItemClick(AssistViewToolbarItemClickedEventArgs args)
{
// Handle response toolbar item click here
}
}
Constructors
ResponseToolbar()
Declaration
public ResponseToolbar()
Properties
ItemClicked
Event is raised when click the toolbar item of response in the SfAIAssistView component.
Declaration
[Parameter]
public EventCallback<AssistViewToolbarItemClickedEventArgs> ItemClicked { get; set; }
Property Value
| Type |
|---|
| EventCallback<AssistViewToolbarItemClickedEventArgs> |
Remarks
This event is triggered when click the toolbar item of response in the SfAIAssistView component.
Width
Gets or sets the width of the response toolbar in the SfAIAssistView component.
Declaration
[Parameter]
public string Width { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the width of the response toolbar. The default value is |
Remarks
Use this property to specify the width of the toolbar in the response item of the SfAIAssistView component.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
Dispose(bool)
Dispose unmanaged resources in the Syncfusion Blazor component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | Boolean value to dispose the object. |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |