'Assign ultracalendarInfo instance to ultraDayView Me.ultraDayView1.CalendarInfo = ultraCalendarInfo1 'Groups Owners within the Date Me.ultraDayView1.GroupingStyle = DayViewGroupingStyle.OwnerWithinDate Me.ultraCalendarInfo1.Owners.Add("FirstOwner", "Lopez") Me.ultraCalendarInfo1.Owners.Add("SecondOwner", "Welby") 'Date setting for Lopez Dim lopez As Owner = Me.ultraCalendarInfo1.Owners("FirstOwner") lopez.DateSettings.Add(DateTime.Today) Dim lopezWorkingHr1 As New TimeRange(New TimeSpan(10, 0, 0), New TimeSpan(11, 0, 0)) lopez.DateSettings(DateTime.Today).WorkingHours.Add(lopezWorkingHr1) Dim lopezWorkingHr2 As New TimeRange(New TimeSpan(13, 0, 0), New TimeSpan(14, 0, 0)) lopez.DateSettings(DateTime.Today).WorkingHours.Add(lopezWorkingHr2) 'Set Appearance object for Lopez's working hours Dim lopezAppearance As New Infragistics.Win.Appearance("dateAppearance") lopezAppearance.BackColor = Color.Pink lopez.DateSettings(DateTime.Today).TimeRangeAppearances.Add(lopezWorkingHr1, lopezAppearance) lopez.DateSettings(DateTime.Today).TimeRangeAppearances.Add(lopezWorkingHr2, lopezAppearance) 'Date setting for welby Dim welby As Owner = Me.ultraCalendarInfo1.Owners("SecondOwner") welby.DateSettings.Add(DateTime.Today) Dim welbyWorkingHr1 As New TimeRange(New TimeSpan(9, 0, 0), New TimeSpan(10, 0, 0)) welby.DateSettings(DateTime.Today).WorkingHours.Add(welbyWorkingHr1) Dim welbyWorkingHr2 As New TimeRange(New TimeSpan(12, 0, 0), New TimeSpan(13, 0, 0)) welby.DateSettings(DateTime.Today).WorkingHours.Add(welbyWorkingHr2) 'Set Appearance object for Welby's working hours Dim welbyAppearance As New Infragistics.Win.Appearance("dateAppearance") welbyAppearance.BackColor = Color. LightSkyBlue welby.DateSettings(DateTime.Today).TimeRangeAppearances.Add(welbyWorkingHr1, welbyAppearance) welby.DateSettings(DateTime.Today).TimeRangeAppearances.Add(welbyWorkingHr2, welbyAppearance)