RadListPicker disabled style

7 posts, 0 answers
  1. BillVo
    BillVo avatar
    12 posts
    Member since:
    Aug 2010

    Posted 02 Sep 2013 Link to this post

    I'd like to control the foreground and background colors for a disabled RadListPicker.  Looking at the style generated by Blend it's not clear.  Any guidance would be appreciated.
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 04 Sep 2013 Link to this post

    Hi Bill,

    Please take a look at the attachment. To achieve your scenario, you'll have to edit the Disabled state of RadListPicker. 

    Regards,
    Kiril Stanoev
    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
  4. BillVo
    BillVo avatar
    12 posts
    Member since:
    Aug 2010

    Posted 04 Sep 2013 Link to this post

    Kiril,

     

    Thanks for your response.  This example demonstrates how to toggle the Enabled/Disabled states from a button.  It also provides a hint as to where one would code state-specific styling.  To your sample, in the indicated section, I added the following:

    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupModeLabel" Storyboard.TargetProperty="Foreground" Duration="0">
        <DiscreteObjectKeyFrame Value="Green" KeyTime="0" />
    </ObjectAnimationUsingKeyFrames>
    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupModeLabel" Storyboard.TargetProperty="Background" Duration="0">
        <DiscreteObjectKeyFrame Value="Gold" KeyTime="0" />
    </ObjectAnimationUsingKeyFrames>
     

    These seem to have no effect on appearance of the RadListPicker.  Would you have time to flesh-out your example in a way that would show specified foreground and background colors applied for the Disabled state?

     

    Thanks,

    BillVo

  5. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 05 Sep 2013 Link to this post

    Hi Bill,

    Please take a look at the attached file and examine the ItemStyle style setter. The result from the attached code should be something like this: http://screencast.com/t/JybYA2FdKr0
     
    Let me know if this works for you.

    Regards,
    Kiril Stanoev
    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 >>
  6. BillVo
    BillVo avatar
    12 posts
    Member since:
    Aug 2010

    Posted 05 Sep 2013 Link to this post

    Kiril,

    Kudos!  What you've produced works beautifully. 

    My next question is, "How?"  Is there some resource Telerik customers would use to produce the "ItemStyle" property setter that you've added to the ListPickerStyle--at least in the control's default form with gray disabled text instead of the gold on green scheme?
    • Is there a feature in Blend or Visual Studio that outputs this? 
    • Are there some files installed with the control suite? 
    • Is this included in documentation on the public website?
    • Is it contained in unpublished Telerik documentation?
    • Or did you have to build this from scratch based on your own XAML knowledge?

    I'm hoping that as I explore more Telerik XAML controls it will be easy for me to achieve similar results without taking up your time.

    Thanks,
    BillVo
  7. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 09 Sep 2013 Link to this post

    Hello Bill,

    Thanks for writing back.

    You can extract the styles for all controls in the Visual Studio or Expression Blend designer by right-clicking on the control and choosing the Edit Template/ Edit Item Style options.

    I hope this helps.

    Regards,
    Deyan
    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 >>
  8. OTMOP
    OTMOP avatar
    20 posts
    Member since:
    Jun 2012

    Posted 25 Feb Link to this post

    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="border">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="0.5"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Gray"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>

     

    Disabled storyboard just not working. How to fix it?

Back to Top
DevCraft banner