RadComboBox Different colors for each element

1 posts, 0 answers
  1. Alex
    Alex avatar
    1 posts
    Member since:
    Jan 2012

    Posted 26 Jan 2012 Link to this post

    I am working on a RadComboBox that will be used in a Time Tracking program. The drop down box currently is used to display the beginning date for the current week, next week, and the 6 weeks prior. So, for example, today is the 26 January 2012, so it displays 12/12/11, 12/19/11.... and so on. When a week is selected, it displays time information that the employee has entered so far, so that they can submit it and be paid. I need to, in the RadComboBox, display background colors for each item depending on if they have hit their minimum number of hours needed to submit, which is 37.5. The box is initialized using the following code:

            private void BuildWeeksComboBoxData( )

                // Obtain the "Seed" date, which is current date
                // Then add in the previous six weeks, current week, and week after
                DateTime firstDay = GetFirstDayInWeek(DateTime.UtcNow, DayOfWeek.Monday);

                for (int i = 0; i < 8; i++)
                {WeeksToSelect.Add(firstDay.AddDays(7 * (i - 6)));}

                WeekComboBox.ItemsSource = WeeksToSelect;

    Any suggestions on how I can go about accomplishing this?
Back to Top