Class AssistViewToolbar
Represents a toolbar component for assist views within an SfAIAssistView, enabling users to invoke custom actions via toolbar items.
Inherited Members
Namespace: Syncfusion.Blazor.InteractiveChat
Assembly: Syncfusion.Blazor.dll
Syntax
public class AssistViewToolbar : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
Integrates into the parent SfAIAssistView through the cascading Syncfusion.Blazor.InteractiveChat.AssistViewToolbar.Parent parameter.
Defines toolbar items via its ChildContent and exposes the ItemClicked event
to handle user interactions with those items.
Examples
The following example demonstrates how to configure an AssistViewToolbar with two toolbar items and handle the ItemClicked event:
@using Syncfusion.Blazor.InteractiveChat
<SfAIAssistView>
<AssistViewToolbar ItemClicked="OnToolbarItemClick">
<AssistViewToolbarItem Text="Refresh" IconCss="e-icons e-refresh" />
<AssistViewToolbarItem Text="Settings" IconCss="e-icons e-settings" />
</AssistViewToolbar>
</SfAIAssistView>
@code {
private Task OnToolbarItemClick(AssistViewToolbarItemClickedEventArgs args)
{
// your logic here
}
}
Constructors
AssistViewToolbar()
Declaration
public AssistViewToolbar()
Properties
ItemClicked
Event is raised when click the toolbar item 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 in 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. |