How do i bind my ObservableCollection<T> object in my codebehind to my listbox... Silverlight WP7
- by Nawaz Dhandala
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!!!