Version

Configuring xamDayView

This is one of the five topics explaining the views of the xamSchedule controls:

This topic is organized in sections as follows:

  • Introduction

  • Purpose

  • Presenting Activities in the Schedule

  • Configuring the Data Source

  • User Interaction and Usability

  • xamDayView Configuration Options

  • Related Topics

Introduction

xamDayView is one of the five view controls included in the XamSchedule family. This view displays one or more days arranged horizontally, where each day is broken up into a series of vertically arranged timeslots based on a specified interval (e.g., 15 minutes). (Figure 1)

xamSchedule Day01.png
Figure 1: Example of the xamMonthView control

The timeslots are preceded by 1 or 2 time-zone header areas which indicate the time associated with a given timeslot in a specified time zone. This view also includes a “MultiDay Activity” area where activities whose duration is 24 hours or greater are displayed. Both of these areas support scrolling.

Purpose

The purpose of this view is to provide hour-based representation of the activities for the days of the week.

Presenting Activities in the Schedule

The activities are displayed as rectangles filling the timeslots between their Start and End times.

Configuring the Data Source

The data for the activities and resource calendars displayed in the view is provided by an instance of XamScheduleDataManager. That instance is configured with the DataManager property of xamDayView.

User Interaction and Usability

In XamDayView, users can:

  • Navigate through the timeslots and activities using the keyboard

  • Create activities with one click of the mouse:

    • by selecting timeslots (with the keyboard or mouse) and start typing

    • by clicking the “Click to Add” prompt that is displayed when hovering over a time slot

  • Resize an activity (that is, change the Start or End of an activity) using the resize grips

  • Drag an activity from one schedule to another (that is, among different xamSchedule controls associated with the same xamScheduleDataManager)

  • Click and modify the Subject of an activity

  • Create a new activity by double-clicking a day (via the activity dialog)

  • Edit an activity by double-clicking on it.

  • Navigate to an activity using the more activity arrows

  • Scroll the schedule using the scrollbar or mouse wheel

  • Delete selected activities

    • with the Delete key

    • from the Activity dialog

  • Scroll and resize the calendar group area

  • Resize of the multiday activity area

xamDayView Configuration Options

  • WeekDisplayMode – this setting has three options:

  • ShowWorkingHoursOnly is a boolean property that allows the developer to show only the working hours of the day. The default (9am-5pm) values can be changed via WorkingHours property in Settings of the XamDataManager. (See the Working Hours topic)

  • Secondary Timezone settings – the xamDayView displays one primary timezone header by default. However, there is a property called SecondaryTimeZoneVisibility that allows the developer to show a secondary Timezone header. There are also properties for setting the TimeZoneId and the label for it. Here is a sample:

    In Visual Basic:

    dayView.SecondaryTimeZoneVisibility = _
        System.Windows.Visibility.Visible
    dayView.SecondaryTimeZoneLabel = _
        "SecodaryLabel"
    dayView.SecondaryTimeZoneId = _
        "Central Standard Time"

    In C#:

    dayView.SecondaryTimeZoneVisibility =
        System.Windows.Visibility.Visible;
    dayView.SecondaryTimeZoneLabel =
        "SecodaryLabel";
    dayView.SecondaryTimeZoneId =
        "Central Standard Time";
  • MultiDay activity area visibility can be controlled by the developer by setting the MultiDayActivityAreaVisibility property.

    In Visual Basic:

    dayView.MultiDayActivityAreaVisibility = _
        System.Windows.Visibility.Visible

    In C#:

    dayView.MultiDayActivityAreaVisibility =
        System.Windows.Visibility.Visible;
  • Calendar Display options – there are several settings that come in handy when working with multiple calendars.

    xamSchedule Day02.png
    • CalendarDisplayMode – this property has three valid options: Overlay, Separate and Merged.

      In Visual Basic:

      dayView.CalendarDisplayMode = CalendarDisplayMode.Overlay

      In C#:

      dayView.CalendarDisplayMode = CalendarDisplayMode.Overlay;
      xamSchedule Day03.png

      In Visual Basic:

      dayView.CalendarDisplayMode = CalendarDisplayMode.Separate

      In C#:

      dayView.CalendarDisplayMode = CalendarDisplayMode.Separate;
      xamSchedule Day04.png

      In Visual Basic:

      dayView.CalendarDisplayMode = CalendarDisplayMode.Merged

      In C#:

      dayView.CalendarDisplayMode = CalendarDisplayMode.Merged;
      xamSchedule Day05.png
    • ShowCalendarCloseButton and ShowCalendarOverlayButton properties control the visibility of calendar buttons.

  • Visible Days – the developer can show multiple days for one calendar just by populating the VisibleDates collection.

    In Visual Basic:

    'First clear the existing dates and then set the new ones.
    dayView.VisibleDates.Clear()
    dayView.VisibleDates.Add(New System.DateTime(2010, 9, 23))
    dayView.VisibleDates.Add(New System.DateTime(2010, 9, 25))

    In C#:

    //First clear the existing dates and then set the new ones.
    dayView.VisibleDates.Clear();
    dayView.VisibleDates.Add(new System.DateTime(2010, 9, 23));
    dayView.VisibleDates.Add(new System.DateTime(2010, 9, 25));
    xamSchedule Day06.png
  • TimeslotInterval – This property allows the developer to change the default 15-minute timeslots.

    In Visual Basic:

    dayView.TimeslotInterval = New System.TimeSpan(0, 30, 0)

    In C#:

    dayView.TimeslotInterval = new System.TimeSpan(0, 30, 0);
    xamSchedule Day07.png
  • The single calendars or calendar groups (depending of the value set in the CalendarDisplayMode property) have equal size. In case you have more calendars in one group comparing to the other, some of the tab titles may not be visible. By setting the AllowCalendarGroupResizing Boolean property, you enable/disable the end user to resize the calendar groups. When resizing the groups, they continue to have equal size and this leads to a point where their combined size is bigger than the container and at this point a scrollbar will automatically be shown. Double clicking on the resizing point will restore the initial size of the calendar groups.

    In Visual Basic:

    dayView.CalendarDisplayMode = CalendarDisplayMode.Overlay

    In C#:

    dayView.CalendarDisplayMode = CalendarDisplayMode.Overlay;
    xamSchedule dayView resizing groups 1.png

    In Visual Basic:

    dayView.CalendarDisplayMode = CalendarDisplayMode.Separate

    In C#:

    dayView.CalendarDisplayMode = CalendarDisplayMode.Separate;
    xamSchedule dayView resizing groups 2.png
  • Sometimes the multiday activity area may be smaller to display all activities and an arrow will be displayed to allow the end user to scroll through the activities. You can allow the end user to resize the multiday activity area by setting the Boolean property AllowMultiDayActivityAreaResizing to true. Also you can use the MultiDayActivityAreaHeight property to specify custom height for it. Double clicking on the resizing point will restore the initial sizing behavior of the multiday activity area and set the MultiDayActivityAreaHeight property to NaN.

    In Visual Basic:

    dayView.AllowMultiDayActivityAreaResizing = True

    In C#:

    dayView.AllowMultiDayActivityAreaResizing = true;
    xamSchedule dayView resizing area 1.png