This is a migrated thread and some comments may be shown as answers.

Expanded State of RadListPickerItem did not work correctly

1 Answer 28 Views
ListPicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lion Pham
Top achievements
Rank 1
Lion Pham asked on 24 Dec 2013, 04:09 PM
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:

<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

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 30 Dec 2013, 08:44 AM
Hi Dung,

Thank you for reporting this issue.

We will do our best to fix it for Service Pack 2 which is expected in 2 weeks.

I have updated your Telerik points for your cooperation.

Regards,
Todor
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ListPicker
Asked by
Lion Pham
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or