CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Fort Worth Texas

    Question Refresh of WPF controls

    Attached is a small simple VB.NET app that loads a Listview with some items. I want the items to appear as I add them but right now they do not appear until all of the items are added. What do I have to do to get an added item to appear as I add them? Thank you
    Attached Files Attached Files
    Last edited by Jim Bassett; September 30th, 2009 at 03:46 PM. Reason: Make problem clearer and note an attachment has been added

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: Refresh of WPF controls

    I would recommend is using an ObservableCollection and bind the listbox to the collection.

    That way you can add/remove items to the collection and the listbox will automatically display the changes. Also, you probably want to set it up in the Loaded event instead of ContentRendered event.

    I don't code in VB, but here's a link to a sample:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.