How to prevent the text color changing when you select an item?

3 posts, 1 answers
  1. Arash
    Arash avatar
    12 posts
    Member since:
    Aug 2011

    Posted 25 Aug 2011 Link to this post

    Dear Telerik team,

    I would like to disable the text color changing that occurs when an item is selected in the RadJumpList control

    I know with ListBoxes, you can just retemplate the "ItemContainerStyle" property, but I see no equivalent (or at least I can't find it) for the RadJumpList.

    Thank you for your help,

    Arash Emami
    Seles Games
  2. Answer
    Georgi
    Admin
    Georgi avatar
    296 posts

    Posted 26 Aug 2011 Link to this post

    Hi Arash,

    Thanks for getting back to us.

    There is an ItemContainerStyle property in RadJumpList, which is inherited from RadDataBoundListBox. Setting custom style you can alter the appearance of each item but still, the visual effect of changing the foreground of the selected item will be present unless you supply a new ControlTemplate with no visual states defined. This however requires far more code than just applying some custom ItemTemplate with predefined Foreground:

    <telerik:RadDataBoundListBox.ItemTemplate>
        <DataTemplate>
            <TextBlock Foreground="{StaticResource PhoneForegroundBrush}" Text="{Binding}"/>
        </DataTemplate>
    </telerik:RadDataBoundListBox.ItemTemplate>

    I hope this information is useful. Let me know if there is something else I can help you with.

    Greetings,
    Georgi
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
  4. Arash
    Arash avatar
    12 posts
    Member since:
    Aug 2011

    Posted 29 Aug 2011 Link to this post

    That works - thank you Georgi
Back to Top