I have an UltraDayView that I default to 7 selected days. This looks great in my app, but I have a problem when I attempt to click on a day and make it the active day. How do I know which day has been clicked? I am also trying to set a background color on days that are holidays, but again haven't found a way to do this for a specific day in the selected days.
Can anyone offer any assistance?
Thanks,
Randall Luce
The day appearances are applied to the AllDayEvent area. They are actually applied to the area "behind" the TimeSlots as well, but because the time slot appearance is full opaque unless you specify otherwise, it is blocked. You could set the BackColor of the WorkingHour/NonWorkingHourTimeSlot appearances to Color.Transparent, and you would then see the day appearance.
You could also implement the IUIElementDrawFilter interface to handle this for you; a similar example is demonstrated in the following KB article: http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=5595
Note that in your case you would probably have to do something like handle MouseClick, use GetVisibleDayFromPoint to get the day that was clicked, and then somehow let the IUIElementDrawFilter implementation know what day was clicked so you can draw that one differently
Setting the color this way doesn't seem to work for the UltraDayView control. Works great for the UltraMonthView. I have had some success with displaying a single day and setting the worktime appearance. Using this same method doesn't seem to work when dealing with multiple columns in the UltraDayView control.
1. You can use the GetVisibleDayFromPoint method to get the day that has been clicked.
2. To set the background color for a specific day:
UltraCalendarLook calendarLook = dayView.CalendarLook;DayLook dayLook = calendarLook.GetDayLook( someDate, true );dayLook.Appearance.BackColor = Color.Green;