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
325
Changing the computedbackground timeslot colors
posted

Currently we feed data to XamDayView related to times that are "available" and times that are not. This control automatically colors the timeslot cells either lightblue or white, each referring to its availability status. 

My goal is to change these two colors. However looking at the code, I see the colors are binding to the "computedbackground".

I am looking for some assistance in how to edit the colors returned from this specific binding.

 

Thank you!

Parents
No Data
Reply
  • 54937
    Offline posted

    The ComputedBackground is a readonly brush property that is exposed by the element to indicate what color the background should be based on the rules/behavior that Outlook follows. So in this case the brush chosen is based on whether the timeslot is selected and whether it is a working hour or not. The working hours are calculated/resolved based on the various working hour related properties exposed by the XamScheduleDataManager. These include the DaySettingsOverride that has been provided for the associated Resource, the DaySettingsOverrides that have been set on the XamScheduleDataManager's Settings, the DaySettings specified on the DaysOfWeek of the Resource, the DaySettings specified on the DaysOfWeek of the XSDM's Settings and then finally based on the XSDM's Settings->WorkDays and DefaultWorkingHours.

    So if you want this brush to be based on the working hours we have you would set the working hours as appropriate at the desired level. If you want it to be based on something else then you would retemplate the desired element and bind to something else that exposes the brush you want to use or bound to some property that has a converter and does the logic you want to determine what brush to use.

Children
No Data