Click here to Skip to main content
14,603,570 members

Silverlight / WPF

 
GeneralRe: UserControl Pin
Kevin Marois6-Dec-16 4:49
professionalKevin Marois6-Dec-16 4:49 
GeneralRe: UserControl Pin
Meshack Musundi6-Dec-16 5:04
professionalMeshack Musundi6-Dec-16 5:04 
AnswerRe: UserControl Pin
Richard Deeming6-Dec-16 2:10
mveRichard Deeming6-Dec-16 2:10 
GeneralRe: UserControl Pin
Kevin Marois6-Dec-16 4:47
professionalKevin Marois6-Dec-16 4:47 
QuestionC# WPF listbox binding to selected item does not update my property Pin
Member 128805954-Dec-16 5:54
MemberMember 128805954-Dec-16 5:54 
AnswerRe: C# WPF listbox binding to selected item does not update my property Pin
Richard Deeming5-Dec-16 1:58
mveRichard Deeming5-Dec-16 1:58 
GeneralRe: C# WPF listbox binding to selected item does not update my property Pin
Member 128805955-Dec-16 9:08
MemberMember 128805955-Dec-16 9:08 
GeneralRe: C# WPF listbox binding to selected item does not update my property Pin
Jon McKee5-Dec-16 10:59
professionalJon McKee5-Dec-16 10:59 
ItemsSource binds to a collection. There is a default CollectionView generated that is what you are actually seeing. The CollectionView listens for a CollectionChanged event not a PropertyChanged event. Now, you may assume that ObservableCollection handles all this for you, and generally it does. But you are not performing any actions that are monitorable by this class (Add, Move, Remove, Replace, Reset[^]) and instead are completely replacing the instance itself. Try this:
public void PopulateConversationList()
{
   if (selectedContact == null)
   {
       ConversationList = null;
   }
   else
   {
       var conversations = from c in cbdc.Conversations
                           where c.ContactID == SelectedContact.Id
                           select c;
       ConversationList.Clear();
       foreach (Conversation c in conversations)
       {
         ConversationList.Add(c);
       }
   }
}

I highly recommend anyone learning WPF to read the MSDN Data Binding Overview[^] article. If you skip down to "Binding to Collections" you'll see relevant information for both your question and my answer Smile | :)

Haven't had a chance to actually run the code but this definitely seems like the issue since I've run into the same problem before.
GeneralRe: C# WPF listbox binding to selected item does not update my property Pin
Member 128805956-Dec-16 7:38
MemberMember 128805956-Dec-16 7:38 
GeneralRe: C# WPF listbox binding to selected item does not update my property Pin
Jon McKee6-Dec-16 8:23
professionalJon McKee6-Dec-16 8:23 
GeneralRe: C# WPF listbox binding to selected item does not update my property Pin
Member 128805956-Dec-16 9:10
MemberMember 128805956-Dec-16 9:10 
GeneralRe: C# WPF listbox binding to selected item does not update my property Pin
Jon McKee6-Dec-16 10:30
professionalJon McKee6-Dec-16 10:30 
GeneralRe: C# WPF listbox binding to selected item does not update my property Pin
Member 128805957-Dec-16 8:10
MemberMember 128805957-Dec-16 8:10 
GeneralRe: C# WPF listbox binding to selected item does not update my property Pin
Jon McKee5-Dec-16 10:13
professionalJon McKee5-Dec-16 10:13 
AnswerRe: C# WPF listbox binding to selected item does not update my property Pin
Gerry Schmitz5-Dec-16 5:51
mveGerry Schmitz5-Dec-16 5:51 
GeneralRe: C# WPF listbox binding to selected item does not update my property Pin
Member 128805955-Dec-16 9:10
MemberMember 128805955-Dec-16 9:10 
QuestionTabControl views are not disposed Pin
Leif Simon Goodwin23-Nov-16 4:55
mvaLeif Simon Goodwin23-Nov-16 4:55 
AnswerRe: TabControl views are not disposed Pin
Pete O'Hanlon23-Nov-16 5:30
subeditorPete O'Hanlon23-Nov-16 5:30 
PraiseRe: TabControl views are not disposed Pin
Leif Simon Goodwin23-Nov-16 21:09
mvaLeif Simon Goodwin23-Nov-16 21:09 
QuestionIs there any way to automate the silverlight application using Eclipse-testng-selenium-java frameowork Pin
Ashish khanduri20-Nov-16 18:23
MemberAshish khanduri20-Nov-16 18:23 
AnswerRe: Is there any way to automate the silverlight application using Eclipse-testng-selenium-java frameowork Pin
Mycroft Holmes20-Nov-16 19:39
professionalMycroft Holmes20-Nov-16 19:39 
GeneralRe: Is there any way to automate the silverlight application using Eclipse-testng-selenium-java frameowork Pin
Ashish khanduri20-Nov-16 19:50
MemberAshish khanduri20-Nov-16 19:50 
QuestionSound Command that can intercept the Active Thread Pin
Vimalsoft(Pty) Ltd15-Nov-16 17:56
professionalVimalsoft(Pty) Ltd15-Nov-16 17:56 
AnswerRe: Sound Command that can intercept the Active Thread Pin
Gerry Schmitz16-Nov-16 6:07
mveGerry Schmitz16-Nov-16 6:07 
QuestionCan't Move Label with mouse in WPF Pin
Dadou5512-Nov-16 22:44
MemberDadou5512-Nov-16 22:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.