Expanded State of RadListPickerItem did not work correctly

2 posts, 0 answers
  1. Lion Pham
    Lion Pham avatar
    13 posts
    Member since:
    May 2013

    Posted 24 Dec 2013 Link to this post

    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
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 30 Dec 2013 Link to this post

    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 >>
  3. DevCraft banner
Back to Top