menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ScheduleViewTimeScale - Blazor API Reference | Syncfusion

    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
    System.Object
    SfBaseComponent
    SfDataBoundComponent
    ScheduleViewTimeScale
    Inherited Members
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.GetEffectivePlatform()
    SfBaseComponent.GetMainComponentPlatform()
    SfBaseComponent.IsMainLicenseComponent()
    SfBaseComponent.LicenseContext
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicense()
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfDataBoundComponent.OnAfterRenderAsync(Boolean)
    SfDataBoundComponent.SetDataManager<T>(Object)
    Namespace: Syncfusion.Blazor.Schedule
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ScheduleViewTimeScale : SfDataBoundComponent
    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
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.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
    public bool Enable { get; set; }
    Property Value
    Type Description
    System.Boolean

    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
    public int Interval { get; set; }
    Property Value
    Type Description
    System.Int32

    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 Microsoft.AspNetCore.Components.RenderFragment<> that defines custom appearance for displaying the major time slot cells.

    Declaration
    public RenderFragment<TemplateContext> MajorSlotTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.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 Microsoft.AspNetCore.Components.RenderFragment<> that defines custom appearance for displaying the minor time slot cells.

    Declaration
    public RenderFragment<TemplateContext> MinorSlotTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.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
    public int SlotCount { get; set; }
    Property Value
    Type Description
    System.Int32

    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
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Overrides
    SfDataBoundComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Overrides
    SfDataBoundComponent.OnParametersSetAsync()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved