Hi
I am using date interval in days on the time line view header
I want to set the back color if it is Sunday or Saturday etc.
Let say date from 12-Sep-10 to 18-Sep-10, I want to color the 12 and 18 day header? Or can I also set the full column background color?
Thanks
Atif
You could change the look by accessing the DaysOfYearLook property of the UltraCalendarLook. You can change the look ober Appereace and BackColor for each day of the year. So more specific the day information is, it will override the less specific one.
UltraCalendarLook1.DaysOfYearLook.Item(DateTime).Appearance.BackColor = Color.Black
I don´t know where you got the Item property from... my sample looks like this this.ultraCalendarLook1.DaysOfYearLook[DateTime.Now].Appearance.BackColor = Color.Black;
result : the backgroundcolor of the header is black. (tested under ViewStyle.Office2007)
Has anyone an idea how to change the backcolor of the hole day not only the header to visualize the weekend?
When the PrimaryInterval is set to a one-day interval, the control is supposed to pick up the day appearances defined on the associated UltraCalendarLook, like so:
this.timeLineView.PrimaryInterval = new DateInterval(1, DateIntervalUnits.Days);DayLook dayLook_091210 = this.timeLineView.CalendarLook.GetDayLook( new DateTime(2010, 9, 12), true );dayLook_091210.Appearance.BackColor = Color.Red;
I just noticed, however, that this functionality appears to be broken in the latest source. This will be addressed in the next service release; you might want to report this so that you are notified when the fix is released.
Thanks a lot! I will do this. It would be verry kind if you could give me a hint how you manage the different drawing of the days, depending on the predicate "freetime". The scrrenshot shows your sample app to the ultratimelineview. For me, in my own app works everything fine as long as i use an intervall of 15 minutes, using a 1 day interval lets the control draw all day the same. Where is freetime and the different drawing defined? Thanks, i realy had a look at the sample code but i don´t get the point. sorry.
OK, i got it. UltraTimeLineView.WorkingHourAppearance / UltraTimeLineView.NonWorkingHourAppearance ... its is quite inconsistent that you manage this look not with the ultracalendarlook object. It was not obvious to change this at the ultratimelineview it self. Nevertheless i´m still looking for any information about where the settings for working time ist set.