alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ScheduleToolBarCustom

    Represents a custom toolbar item component that allows you to add custom content or specific item types to the SfSchedule<TValue> toolbar.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ScheduleToolBarCustom
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ScheduleToolBarCustom : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    The ScheduleToolBarCustom component enables you to add custom elements such as buttons, input fields, spacers, separators, or other UI elements to the SfSchedule<TValue> toolbar.

    This component must be placed within a ScheduleToolBar component, which in turn must be within a SfSchedule<TValue> component.

    The component can be rendered without specifying the Type parameter; in this case, it defaults to Button. When rendering input elements within the custom toolbar item, it is mandatory to set the Type parameter to Input.

    Examples

    Demonstrates how to use the ScheduleToolBarCustom to add a custom button that updates the scheduler's selected date.

    <SfSchedule TValue="AppointmentData" @ref="Scheduler" @bind-SelectedDate="@SelectedDate">
        <ScheduleToolBar>
            <ScheduleToolBarCustom>
                <button @onclick="OnCustomClick">Go to End Date</button>
            </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();
        }
        public class AppointmentData
        {
            public string Subject { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
        }
    }

    Constructors

    ScheduleToolBarCustom()

    Declaration
    public ScheduleToolBarCustom()

    Properties

    ChildContent

    Gets or sets the custom content to be rendered within the toolbar tool.

    Declaration
    [Parameter]
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    RenderFragment

    A RenderFragment containing custom content for the toolbar tool. The default value is null. If not specified, no content is rendered.

    Remarks

    This property allows to define custom UI elements, such as a button, dropdowns, or other components, to implement specific actions within the toolbar.

    Examples

    Demonstrates adding a custom button to the ScheduleToolBarCustom.

    <SfSchedule TValue="AppointmentData" @ref="Scheduler" @bind-SelectedDate="@SelectedDate">
        <ScheduleToolBar>
            <ScheduleToolBarCustom>
                <button @onclick="OnCustomClick">Go to End Date</button>
            </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();
        }
        public class AppointmentData
        {
            public string Subject { get; set; }
            public DateTime StartTime { get; set; }
            public DateTime EndTime { get; set; }
        }
    }

    Type

    Gets or sets the type of the toolbar item to render.

    Declaration
    [Parameter]
    public ItemType Type { get; set; }
    Property Value
    Type Description
    ItemType

    One of the ItemType enumeration values. The default value is Button.

    Remarks

    The component can be rendered without specifying the Type parameter; in this case, it defaults to Button. When rendering input elements within the custom toolbar item, it is mandatory to set the Type parameter to Input.

    This property determines how the custom toolbar item is rendered:

    • ButtonRenders the custom content as a button-type toolbar item. This is the default type when not specified.
    • InputRenders the custom content as an input-type toolbar item. Use this type when adding input elements such as textboxes or search fields. It is mandatory to set this type when rendering input elements.
    • SpacerRenders a flexible spacer that pushes subsequent toolbar items to the right, creating dynamic spacing between toolbar elements.
    • SeparatorRenders a vertical separator line to visually divide groups of toolbar items.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Dispose(bool)

    Disposes 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
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    Task
    Overrides
    ComponentBase.OnInitializedAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved