alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class ScheduleViewTimeScale

    A class that represents the view-specific time scale configurations by rendering ScheduleViewTimeScale as child content in ScheduleView tag.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    SfDataBoundComponent
    ScheduleViewTimeScale
    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.OnInitialized()
    ComponentBase.OnParametersSet()
    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
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(bool)
    SfBaseComponent.GetEffectivePlatform()
    SfBaseComponent.GetMainComponentPlatform()
    SfBaseComponent.IsMainLicenseComponent()
    SfBaseComponent.LicenseContext
    SfBaseComponent.OnObservableChange(string, object, bool, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicense()
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfDataBoundComponent.OnAfterRenderAsync(bool)
    SfDataBoundComponent.SetDataManager<T>(object)
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ScheduleViewTimeScale : SfDataBoundComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    You can configure the view wise time scale by specifying values for the corresponding properties. Timescale can be applied for Day, Week, WorkWeek, TimelineDay, TimelineWeek and TimelineWorkWeek views.

    Examples

    The following code example shows how to configure the view wise time scale:

    <SfSchedule TValue="AppointmentData">
        <ScheduleViews>
            <ScheduleView Option="View.Day">
                <ScheduleViewTimeScale Enable="true" Interval="60" SlotCount="6"></ScheduleViewTimeScale>
            </ScheduleView>
            <ScheduleView Option="View.Week">
                    <ScheduleViewTimeScale Enable="false"></ScheduleViewTimeScale>
            </ScheduleView>
            <ScheduleView Option="View.TimelineWorkWeek">
                <ScheduleViewTimeScale Enable="true" Interval="30" SlotCount="3"></ScheduleViewTimeScale>
            </ScheduleView>
        </ScheduleViews>
    </SfSchedule>

    Constructors

    ScheduleViewTimeScale()

    Declaration
    public ScheduleViewTimeScale()

    Properties

    ChildContent

    Gets or sets the child content of schedule view-specific timescale.

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

    The value used to build the content.

    Enable

    Gets or sets a value indicating whether the schedule should display the appointments accurately against the exact time duration.

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

    If set to false, all the appointments of a day will be displayed one below the other. The default value is true.

    Interval

    Gets or sets the time duration on which the time axis should be displayed, either in 1 hour or 30 minutes intervals, etc.

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

    The interval value in minutes. The default value is 60.

    Remarks

    This property will have an effect when the Enable property is set to true.

    MajorSlotTemplate

    Gets or sets template as a RenderFragment<TValue> that defines custom appearance for displaying the major time slot cells.

    Declaration
    [Parameter]
    public RenderFragment<TemplateContext> MajorSlotTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<TemplateContext>

    A template content that specifies the visualization of major time slot cells. The default value is null.

    Remarks

    The time details can be accessed within this template. This property will have an effect when the Enable property is set to true.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleViews>
            <ScheduleView Option="View.Day" Interval="30" SlotCount="3">
                <ScheduleViewTimeScale>
                    <MajorSlotTemplate>
                        <div>@(GetMajorSlotTemplate((context as TemplateContext).Date))</div>
                    </MajorSlotTemplate>
                </ScheduleViewTimeScale>
            </ScheduleView>
            <ScheduleView Option="View.Week">
                <ScheduleViewTimeScale>
                    <MajorSlotTemplate>
                        <div>@(GetMajorSlotTemplate((context as TemplateContext).Date))</div>
                    </MajorSlotTemplate>
                </ScheduleViewTimeScale>
            </ScheduleView>
            <ScheduleView Option="View.WorkWeek"></ScheduleView>
        </ScheduleViews>
    </SfSchedule>
    @code{
        public static string GetMajorSlotTemplate(DateTime date)
        {
            return date.ToString("hh", CultureInfo.InvariantCulture);
        }
    }

    MinorSlotTemplate

    Gets or sets template as a RenderFragment<TValue> that defines custom appearance for displaying the minor time slot cells.

    Declaration
    [Parameter]
    public RenderFragment<TemplateContext> MinorSlotTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<TemplateContext>

    A template content that specifies the visualization of minor time slot cells. The default value is null.

    Remarks

    The time details can be accessed within this template. This property will have an effect when the Enable property is set to true.

    Examples
    <SfSchedule TValue="AppointmentData">
        <ScheduleViews>
            <ScheduleView Option="View.Day">
                <ScheduleViewTimeScale Interval="30" SlotCount="3">
                    <MinorSlotTemplate>
                        <div style="text-align: right; margin-right: 15px">@(GetMinorSlotTemplate((context as TemplateContext).Date))</div>
                    </MinorSlotTemplate>
                </ScheduleViewTimeScale>
            </ScheduleView>
            <ScheduleView Option="View.Week">
                <ScheduleViewTimeScale>
                    <MinorSlotTemplate>
                        <div style="text-align: right; margin-right: 15px">@(GetMinorSlotTemplate((context as TemplateContext).Date))</div>
                    </MinorSlotTemplate>
                </ScheduleViewTimeScale>
            </ScheduleView>
            <ScheduleView Option="View.WorkWeek"></ScheduleView>
        </ScheduleViews>
    </SfSchedule>
    @code{
        public static string GetMinorSlotTemplate(DateTime date)
        {
            return date.ToString("mm", CultureInfo.InvariantCulture);
        }
    }

    SlotCount

    Gets or sets the number of slots to be split for the specified time interval duration.

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

    The number of slots to be split. The default value is 2.

    Remarks

    This property will have an effect when the Enable property is set to true.

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    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.

    Overrides
    SfDataBoundComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type
    Task
    Overrides
    SfDataBoundComponent.OnParametersSetAsync()

    Implements

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