Class ScheduleToolBar
Represents a container for toolbar tools in the SfSchedule<TValue> component, enabling customization of the scheduler's toolbar.
Inherited Members
Namespace: Syncfusion.Blazor.Schedule
Assembly: Syncfusion.Blazor.dll
Syntax
public class ScheduleToolBar : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
This component is used to configure the toolbar of the SfSchedule<TValue> component by hosting child components such as ScheduleToolBarViews, ScheduleToolBarPrevious, ScheduleToolBarNext, ScheduleToolBarToday, ScheduleToolBarNewEvent, ScheduleToolBarDateRange, or ScheduleToolBarCustom.
The toolbar facilitates navigation, view switching, and custom actions within the scheduler. To customize the toolbar layout, add or reorder child tools as needed.
Ensure the ScheduleToolBar is placed within a SfSchedule<TValue> component, as it relies on the parent scheduler for functionality.
Examples
Demonstrates how to configure a custom toolbar with navigation, view switching, and a custom button.
<SfSchedule TValue="AppointmentData" @ref="Scheduler" @bind-SelectedDate="@SelectedDate">
<ScheduleToolBar>
<ScheduleToolBarViews />
<ScheduleToolBarPrevious />
<ScheduleToolBarNext />
<ScheduleToolBarToday />
<ScheduleToolBarNewEvent />
<ScheduleToolBarDateRange />
<ScheduleToolBarCustom>
<SfButton OnClick="@OnCustomClick">Go to End Date</SfButton>
</ScheduleToolBarCustom>
</ScheduleToolBar>
</SfSchedule>
@code {
private SfSchedule<AppointmentData> Scheduler;
private DateTime SelectedDate { get; set; } = DateTime.Today;
private async Task OnCustomClick()
{
SelectedDate = DateTime.Today.AddDays(10);
await Scheduler.RefreshEventsAsync();
}
}
Constructors
ScheduleToolBar()
Declaration
public ScheduleToolBar()
Properties
ChildContent
Gets or sets the content of the toolbar, typically a collection of toolbar tool components.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment | A RenderFragment containing the child components of the toolbar. The default value is null. If not specified, the toolbar will be empty. |
Remarks
This property accepts components such as ScheduleToolBarViews, ScheduleToolBarPrevious, ScheduleToolBarNext, ScheduleToolBarToday, ScheduleToolBarNewEvent, ScheduleToolBarDateRange, or ScheduleToolBarCustom.
Order the child components to define the toolbar's layout. For performance, ensure only necessary tools are included to avoid rendering overhead.
Examples
Demonstrates adding a custom button to the toolbar.
<ScheduleToolBar>
<ScheduleToolBarCustom>
<SfButton>Custom Action</SfButton>
</ScheduleToolBarCustom>
</ScheduleToolBar>
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()
Declaration
protected override Task OnInitializedAsync()
Returns
| Type |
|---|
| Task |