This question is locked. New answers and comments are not allowed.
Hello,
I want to edit the RadListPicker style with my own style, but I got problem when trying to do that, namely:
I want to change the Foreground of the ContentControl named content when the state of RadListPickerItem changed to Expanded. However, the foreground was not changed when I expand the RadListPicker control.
Here is my code:
Looking for your help.
Regards
I want to edit the RadListPicker style with my own style, but I got problem when trying to do that, namely:
I want to change the Foreground of the ContentControl named content when the state of RadListPickerItem changed to Expanded. However, the foreground was not changed when I expand the RadListPicker control.
Here is my code:
<
Style
TargetType
=
"telerikInput:RadListPickerItem"
>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Left"
/>
<
Setter
Property
=
"VerticalContentAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"Padding"
Value
=
"8,5,8,5"
/>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerikInput:RadListPickerItem"
>
<
Border
Background
=
"{TemplateBinding Background}"
>
<
VisualStateManager.VisualStateGroups
>
<
VisualStateGroup
x:Name
=
"CommonStates"
>
<
VisualState
x:Name
=
"Normal"
/>
<
VisualState
x:Name
=
"Selected"
>
<
Storyboard
>
<
ObjectAnimationUsingKeyFrames
Storyboard.TargetName
=
"content"
Storyboard.TargetProperty
=
"Foreground"
Duration
=
"0"
>
<
DiscreteObjectKeyFrame
Value
=
"{StaticResource PhoneAccentBrush}"
KeyTime
=
"0"
/>
</
ObjectAnimationUsingKeyFrames
>
</
Storyboard
>
</
VisualState
>
<
VisualState
x:Name
=
"Expanded"
>
<
Storyboard
>
<
ObjectAnimationUsingKeyFrames
Storyboard.TargetName
=
"content"
Storyboard.TargetProperty
=
"Foreground"
Duration
=
"0"
>
<
DiscreteObjectKeyFrame
Value
=
"#DF000000"
KeyTime
=
"0"
/>
</
ObjectAnimationUsingKeyFrames
>
</
Storyboard
>
</
VisualState
>
<
VisualState
x:Name
=
"Disabled"
>
<
Storyboard
>
<
ObjectAnimationUsingKeyFrames
Storyboard.TargetName
=
"content"
Storyboard.TargetProperty
=
"Foreground"
Duration
=
"0"
>
<
DiscreteObjectKeyFrame
Value
=
"{StaticResource PhoneDisabledBrush}"
KeyTime
=
"0"
/>
</
ObjectAnimationUsingKeyFrames
>
</
Storyboard
>
</
VisualState
>
</
VisualStateGroup
>
</
VisualStateManager.VisualStateGroups
>
<
ContentControl
x:Name
=
"content"
Content
=
"{TemplateBinding Content}"
ContentTemplate
=
"{TemplateBinding ContentTemplate}"
Foreground
=
"{TemplateBinding Foreground}"
VerticalContentAlignment
=
"{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment
=
"{TemplateBinding HorizontalContentAlignment}"
Margin
=
"{TemplateBinding Padding}"
/>
</
Border
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
Looking for your help.
Regards