ComponentOne Scheduler for WPF and Silverlight
Scheduler Components and Controls / Scheduler for Silverlight Appearance / Using Data Views
In This Topic
    Using Data Views
    In This Topic

    C1Scheduler provides a number of views, such as Day view or Month view, to display data in the C1Scheduler.DataStorage.

    Data View


    One Day View

    Displays a detailed view showing appointments for a particular day.

    Month View

    Displays appointments for one or more months. This is the default view.

    Week View

    Displays appointments for specified week days.

    Working Week View

    Displays appointments for any given weekly period. The default is Monday through Friday.

    Time Line View

    Displays a time line.

    Each view is represented by a single style, each of which is fully defined in XAML. These predefined styles can be applied to C1Scheduler and are accessible via C1Scheduler properties: OneDayStyle, WorkingWeekStyle, WeekStyle, MonthStyle and TimeLineStyle. The default view of the interface is MonthStyle, and the current date is shown.

    To specify a view, Day View for example, assign scheduler's C1Scheduler.ChangeStyle method using the C1Scheduler.OneDayStyle property value:

    Visual Basic
    Copy Code

    Copy Code

    Copy Code
    <c1sched:C1Scheduler Style="{Binding OneDayStyle, RelativeSource={RelativeSource Self}}"/>

    The data view can be set at design time in Visual Studio using the context menu:

    1. Right-click the C1Scheduler control.
    2. Select View and choose One Day, Work Week, Week, or Month.
    Note: You can also change the view through the Properties window by selecting the option from the drop-down list next to the Style property.

    The style can also be set in the Design view of Microsoft Blend. To change the visual Style in a Microsoft Blend project:

    1. Select the C1Scheduler control in your XAML window or page.
    2. In the Properties panel, under View, click drop-down arrow next to the C1Scheduler.Style property.
    3. Select one of the available view styles.

    These properties are used by C1Scheduler to automatically change the styles used if the range of visible dates is changed by the associated calendar control or if the range of visible dates and/or view type is changed by a C1Scheduler command. The user can alter the default behavior by handling the C1Scheduler.BeforeViewChange event or by setting the C1Scheduler ViewStyleSelector property to the custom StyleSelector object.

    To change the whole style set used by C1Scheduler, set the style properties to custom defined styles. For example:

    Copy Code
    // set C1Scheduler’s styles to a custom look.
    scheduler1.OneDayStyle = customOneDayStyle;
    scheduler1.WorkingWeekStyle = customWorkingWeekStyle;
    scheduler1.WeekStyle = customWeekStyle;
    scheduler1.MonthStyle = customMonthStyle;