Binding to a List<object> in silverlight problem.

Posted by cw on Stack Overflow See other posts from Stack Overflow or by cw
Published on 2010-03-28T17:12:18Z Indexed on 2010/03/28 17:13 UTC
Read the original article Hit count: 238

Filed under:
|

Hello, Can someone suggest what I am doing wrong? Basically I have a List Items, when an item gets added to the list I am resetting the collection to the viewmodel property. The only way I can get it to work is if I null the member object out before reassigning the binding. Any suggestions on how to go about updating a UI when an item gets added to a List?

    public List<Item> RegisteredItems 
    {
        get
        {
            return m_vRegisteredItems;
        }
        set
        {
            m_vRegisteredItems= null;
            NotifyPropertyChanged("RegisteredItems");
            m_vRegisteredItems= value;
            NotifyPropertyChanged("RegisteredItems");
        }
    }

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about c#