HI,
I would like to know if there is a way to change the color of an event's background when it is highlighted/hovered over and when it is selected, preferably without having to resort to creating a ControlTemplate. Right now, I know how to change every other property of the event within a intrinsic style for EventContainer, and using style triggers i can change these properties depending on the state of the event. However, the Background property doesn't appear to work when using triggers. An example: Here is my EventContainer Style:
When the event is hovered over, the title text of the event correctly changes from white to red, as defined in the style, but when the event is selected, the background does not change from green to blue. As I stated, I would like to avoid using ControlTemplate if it is possible, as ControlTemplates require a lot of extra useless markup, and a knowledge of the underlying infrastructure, which is impossible to get for the Telerik libraries.
I would like to know if there is a way to change the color of an event's background when it is highlighted/hovered over and when it is selected, preferably without having to resort to creating a ControlTemplate. Right now, I know how to change every other property of the event within a intrinsic style for EventContainer, and using style triggers i can change these properties depending on the state of the event. However, the Background property doesn't appear to work when using triggers. An example: Here is my EventContainer Style:
<
Style
TargetType
=
"g:EventContainer"
>
<
Setter
Property
=
"Background"
Value
=
"Green"
/>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0"
/>
<
Style.Triggers
>
<
Trigger
Property
=
"IsMouseOver"
Value
=
"True"
>
<
Setter
Property
=
"Foreground"
Value
=
"Red"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0"
/>
</
Trigger
>
<
Trigger
Property
=
"IsFocused"
Value
=
"True"
>
<
Setter
Property
=
"Foreground"
Value
=
"Red"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0"
/>
<
Setter
Property
=
"Background"
Value
=
"Blue"
/>
</
Trigger
>
</
Style.Triggers
>
</
Style
>
When the event is hovered over, the title text of the event correctly changes from white to red, as defined in the style, but when the event is selected, the background does not change from green to blue. As I stated, I would like to avoid using ControlTemplate if it is possible, as ControlTemplates require a lot of extra useless markup, and a knowledge of the underlying infrastructure, which is impossible to get for the Telerik libraries.