Class HeaderToolbar
Represents the header toolbar region of the SfChatUI component, allowing definition of toolbar items and handling item-click events.
Inherited Members
Namespace: Syncfusion.Blazor.InteractiveChat
Assembly: Syncfusion.Blazor.dll
Syntax
public class HeaderToolbar : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
Use this component inside an SfChatUI to render a customizable toolbar at the top of the chat UI.
It exposes the Width parameter to control its horizontal size.
The ItemClicked EventCallback<TValue> is invoked when a toolbar item is selected.
Child content may include one or more HeaderToolbarItem elements to define individual buttons or menus.
Examples
<SfChatUI>
<HeaderToolbar Width="100%" >
<HeaderToolbar Width="100%" ItemClicked="OnToolbarItemClicked">
<HeaderToolbarItem Text="Attach" IconCss="e-icons e-attach" />
<HeaderToolbarItem Text="Emoticons" IconCss="e-icons e-smile" />
</HeaderToolbar>
</SfChatUI>
@code {
private Task OnToolbarItemClicked(ChatToolbarItemClickedEventArgs args)
{
// Handle toolbar item click
}
}
Constructors
HeaderToolbar()
Declaration
public HeaderToolbar()
Properties
ItemClicked
Event is raised when a toolbar item in the header is clicked in the SfChatUI component.
Declaration
[Parameter]
public EventCallback<ChatToolbarItemClickedEventArgs> ItemClicked { get; set; }
Property Value
| Type |
|---|
| EventCallback<ChatToolbarItemClickedEventArgs> |
Remarks
This event is triggered when a user clicks on a toolbar item in the header of the SfChatUI component.
Width
Gets or sets the width of the header toolbar in the SfChatUI component.
Declaration
[Parameter]
public string Width { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the width of the header toolbar. The default value is |
Remarks
Use this property to specify the width of the toolbar in the header of the SfChatUI 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. |