'ultracalendarInfo インスタンスを ultraDayView に指定します Me.ultraDayView1.CalendarInfo = ultraCalendarInfo1 '日付内でオーナーをグループ化します Me.ultraDayView1.GroupingStyle = DayViewGroupingStyle.OwnerWithinDate Me.ultraCalendarInfo1.Owners.Add("FirstOwner", "Lopez") Me.ultraCalendarInfo1.Owners.Add("SecondOwner", "Welby") '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) 'Lopez の就業時間に Appearance オブジェクトを設定します 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) '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) 'Welby の就業時間に Appearance オブジェクトを設定します 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)