How do i bind my ObservableCollection<T> object in my codebehind to my listbox... Silverlight WP7
        Posted  
        
            by 
                Nawaz Dhandala
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Nawaz Dhandala
        
        
        
        Published on 2011-01-16T07:36:42Z
        Indexed on 
            2011/01/16
            7:53 UTC
        
        
        Read the original article
        Hit count: 281
        
Silverlight
|windows-phone-7
This is My codebehind
public System.Collections.ObjectModel.ObservableCollection FriendList { get; set; } // I want to bind this to my listbox
public Friends() //this is constructor { InitializeComponent(); this.DataContext = this; //I think this is what I'm doing is right....:) }
How do I bind my FriendList to the ListBox -> FriendList has a property of user.UserName which I want to display it in the TextBlock "friendUsername"
Please help!!!
Thanks for your answers!!!
© Stack Overflow or respective owner