'Declaration Public ReadOnly Property DayOfWeekSettings As DayOfWeekSettingsCollection
public DayOfWeekSettingsCollection DayOfWeekSettings {get;}
With the Infragistics 2009 Volume 1 release, the DayOfWeekSettings class was changed to derive from a new class, OwnerTimeSlotSettings. This class provides the ability to define multiple, discontiguous ranges of time as working hours, and also a means by which an Appearance can be defined for any arbitrary range of time.
Note: For a detailed explanation of the order of precedence used when resolving working hours and time slot appearances, refer to the IsWorkDay, WorkingHours, and TimeRangeAppearances properties of the OwnerTimeSlotSettings class.
Imports System.Collections.Generic Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports System.Diagnostics ' Add a new Owner to the Owners collection Dim myOwner As Owner = Me.calendarInfo.Owners.Add("myCalendar") ' Since the working hours reflect 15 minute breaks, make ' the TimeSlotInterval at least that so that the time slots ' visually depict the breaks. Me.dayView.TimeSlotInterval = TimeSlotInterval.FifteenMinutes Dim mondaySettings As DayOfWeekSettings = myOwner.DayOfWeekSettings(System.DayOfWeek.Monday) ' The day begins at 8AM to 10:45AM, with a break until 11AM mondaySettings.WorkingHours.Add(New TimeRange(TimeSpan.FromHours(8), TimeSpan.FromHours(10.75))) ' 11AM to 12:30PM, with a lunch break from 12:30PM until 1:30PM mondaySettings.WorkingHours.Add(New TimeRange(TimeSpan.FromHours(11), TimeSpan.FromHours(12.5))) ' 1:30PM to 3PM, with a break until 3:15PM mondaySettings.WorkingHours.Add(New TimeRange(TimeSpan.FromHours(13.5), TimeSpan.FromHours(15))) ' Back at 3:15PM to finish the day at 5PM mondaySettings.WorkingHours.Add(New TimeRange(TimeSpan.FromHours(16.25), TimeSpan.FromHours(17)))
using System.Collections.Generic; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.Diagnostics; // Since the working hours reflect 15 minute breaks, make // the TimeSlotInterval at least that so that the time slots // visually depict the breaks. this.dayView.TimeSlotInterval = TimeSlotInterval.FifteenMinutes; // Add a new Owner to the Owners collection Owner myOwner = this.calendarInfo.Owners.Add( "myCalendar" ); DayOfWeekSettings mondaySettings = myOwner.DayOfWeekSettings[System.DayOfWeek.Monday]; // The day begins at 8AM to 10:45AM, with a break until 11AM mondaySettings.WorkingHours.Add( new TimeRange(TimeSpan.FromHours(8), TimeSpan.FromHours(10.75)) ); // 11AM to 12:30PM, with a lunch break from 12:30PM until 1:30PM mondaySettings.WorkingHours.Add( new TimeRange(TimeSpan.FromHours(11), TimeSpan.FromHours(12.5)) ); // 1:30PM to 3PM, with a break until 3:15PM mondaySettings.WorkingHours.Add( new TimeRange(TimeSpan.FromHours(13.5), TimeSpan.FromHours(15)) ); // Back at 3:15PM to finish the day at 5PM mondaySettings.WorkingHours.Add( new TimeRange(TimeSpan.FromHours(16.25), TimeSpan.FromHours(17)) );
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2