Image overlays

2 posts, 1 answers
  1. tom
    tom avatar
    15 posts
    Member since:
    May 2011

    Posted 12 Aug 2011 Link to this post

    Has anybody an idea, how to paint image overlays over the listitems? One solution could be to create the item image dynamically, but I am looking for a better solution (less resource usage and faster processing). The grid view has the rowpaint event, but I don't find such a event for the list view.

  2. Answer
    Jack avatar
    2335 posts

    Posted 17 Aug 2011 Link to this post

    Hi Tom,

    It is easy to draw an overlayed image in list view elements. You just have to handle the VisualItemFormatting event and set the TextImageRelation property to Overlay. Here is a sample:
    void view_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
        e.VisualItem.Image = Resources.file;
        e.VisualItem.ImageAlignment = ContentAlignment.MiddleCenter;
        e.VisualItem.TextImageRelation = TextImageRelation.Overlay;

    I hope this helps. If you have any further questions, I will be glad to help.

    Best wishes,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft R3 2016 release webinar banner
Back to Top