Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Changing background color of certain dates in Calendar control
posted

Is it possible to change background color of certain dates in Calendar control dropdown? e.g. in a month, dates 1,2 & 6 have back color red, 3,14,16 have blue, etc.

  • 54937
    Offline posted

    You can use the CalendarDayStyleSelector and CalendarItemStyleSelector as is demonstrated in the Feature Browser sample that ships with the product. The specific sample is xamMonthCalendar->Theme and Custom Styles->Selectively Styling Calendar Items.

  • 69686
    posted

    Hello,

    You can create a style for the CalendarDay element and bind the Background property to its Value with an IValueConverter and return a different brush depending on that value.