Version

Owner DayOfWeekSettings

The Ultimate UI for Windows Forms 2005 Volume 3 Owner DayOfWeekSettings feature is realized through a collection property which is exposed by the existing Owner class: DayOfWeekSettings . Like the WinCalendarInfo™ component’s DaysOfWeek collection, it contains seven members, each representing a particular day of the week. The members of this DayOfWeekSettings collection are of type DayOfWeekSettings, an object which also exposes three properties named IsWorkDay , WorkDayStartTime , and WorkDayEndTime .

The WinDayView™ control, in emulation of MS Outlook, uses different colors for its TimeSlots based on whether the time division the slot represents falls within "working hours" - previously defined exclusively by the WinCalendarInfo’s DaysOfWeek collection member for that day of the week. With Ultimate UI for Windows Forms 2005 Volume 3’s Owner DayOfWeekSettings feature, an additional layer is added to this process, which is applicable when the WinDayView control is displaying Owners separately.

When determining whether a TimeSlot falls within "working hours", the TimeSlot area first evaluates whether it is displaying Owners separately. If it is, the DayOfWeekSettings object for the day of the week in question is obtained from the owner’s DayOfWeekSettings collection.The IsWorkDay property of that object is queried; if its value is 'Default', the IsWorkDay property of the corresponding member of the WinCalendarInfo’s DaysOfWeek collection is queried, which makes the final determination. If the value of the IsWorkDay property is set to false on either object, the TimeSlot is said to fall in "non-working hours", and the appearances which are specific to non-working hours are applied.

In the case where the IsWorkDay property evaluates to true, the WorkDayStartTime and WorkDayEndTime properties are then queried to determine whether the time division represented by that TimeSlot falls within working hours. If, for example, the WorkDayStartTime property is set to 10AM, and the WorkDayEndTime property is set to 3PM, the TimeSlots which fall in the range of 10AM through 2:59PM are colored as working hour TimeSlots, and all others are colored as non-working hour TimeSlots. The WorkDayStartTime and WorkDayEndTime properties are checked in the same manner as the IsWorkDay property in the preceding paragraph; the owner-specific setting takes precedence, while the WinCalendarInfo’s DaysOfWeek collection member makes the final determination.

owner day of week settings in ultracalendarinfo

The lighter-colored TimeSlots represent the working hours.