Scheduler Components and Controls > Scheduler for Silverlight Appearance > Using Data Views |
C1Scheduler provides a number of views, such as Day view or Month view, to display data in the C1Scheduler.DataStorage.
Data View |
Description |
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
|
---|---|
Scheduler1.ChangeStyle(Scheduler1.OneDayStyle) |
C# |
Copy Code
|
---|---|
Scheduler1.ChangeStyle(Scheduler1.OneDayStyle); |
XAML |
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:
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:
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:
C# |
Copy Code
|
---|---|
// set C1Scheduler’s styles to a custom look.
scheduler1.OneDayStyle = customOneDayStyle;
scheduler1.WorkingWeekStyle = customWorkingWeekStyle;
scheduler1.WeekStyle = customWeekStyle;
scheduler1.MonthStyle = customMonthStyle;
|