Hello Karl,
Thank you for writing back.
Here is the modified code snippet:
void
radCalendar1_ElementRender(
object
sender, RenderElementEventArgs e)
{
if
(radCalendar1.SpecialDays.Contains(e.Day,
new
MyComparer()))
{
e.Element.GradientStyle = GradientStyles.Linear;
e.Element.BackColor = Color.Yellow;
e.Element.BackColor2 = Color.Blue;
e.Element.BorderColor = Color.Blue;
}
else
if
(radCalendar1.FocusedDate == e.Day.Date && e.Day.Date != DateTime.Now.Date)
{
e.Element.DrawFill =
false
;
e.Element.DrawBorder =
false
;
e.Element.ForeColor = Color.FromArgb(21, 66, 139);
}
else
{
e.Element.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
e.Element.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local);
e.Element.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local);
e.Element.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local);
e.Element.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
e.Element.ResetValue(LightVisualElement.BackColor2Property, ValueResetFlags.Local);
e.Element.ResetValue(LightVisualElement.BorderColorProperty, ValueResetFlags.Local);
}
}
and here is the documentation regarding these properties:
http://www.telerik.com/help/winforms/tpf-primitives-fillprimitive.html.
If you think that there might be considerable amount of visual modifications that you want to apply, you can consider
modifying the theme, instead of applying those via code.
Let me know if I can be of further assistance.
Regards,
Stefan
the Telerik team