Change the SelectedItem-Border

3 posts, 1 answers
  1. Markus
    Markus avatar
    11 posts
    Member since:
    May 2013

    Posted 03 Oct 2013 Link to this post

    Hi!

    I have a RadListView in ViewMode "IconView". I want to change the highlight border of the selected items.
    How can I do this?


    Best regards
    Markus
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1408 posts

    Posted 08 Oct 2013 Link to this post

    Hi Markus,

    Thank you for writing us.

    You can change this in the VisualItemFormatting event. Please note that when you are using this event you have to always reset any changed properties:
    void radListView1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
    {
        if (e.VisualItem.Selected)
        {
            e.VisualItem.BorderColor = Color.Black;
        }
        else
        {
            e.VisualItem.ResetValue(LightVisualElement.BorderColorProperty, ValueResetFlags.Local);
        }
    }

    More Information about this matter can be found in the following article: Custom items

    Please let me know if there is something else I can help you with. 

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    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. UI for WinForms is Visual Studio 2017 Ready
  4. Markus
    Markus avatar
    11 posts
    Member since:
    May 2013

    Posted 13 Oct 2013 Link to this post

    Thank you very much :)
Back to Top