I'm using the Template override specific background color:
<ItemTemplate>
@{
var appointment = context as ShiftCalendarBindingModel ?? new ShiftCalendarBindingModel();
}
<div style="height: 100%; width:100%; background-color:@(new MarkupString(appointment.BackGroundColor))">
<strong>@appointment.ProductionLineName</strong><br />
<p>Shift: @appointment.ShiftNumber </p>
</div>
</ItemTemplate>
The issue is that the appointment background color is clipped off (see attached image) and it shows either the schedule color or the resource color (if used), instead of the appointment color as assigned in the code above.
Any suggestions on how to assign the background color and have the appointment fully painted, without having to override CSS, which may effect other controls/color/formatting?
Why not have a color property on the appointment itself. It would be so easy to assign that color property when loading the data, and we could programmatically assign the color any way we'd like based upon the resource, the appointment/appointment type or any type of contextual data we need. The property would eliminate any "clever" work arounds such as the example code provided.
I've attached an image that shows the "clipping" at the end of the appointment. Note the colors seen at the clipping is the Resource color. It would be "white" the calendar background if the resources were not used.
Thanks,
Curt