Click here to Skip to main content
15,914,225 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Bind To Static Property Pin
Richard Deeming13-Jan-17 8:29
mveRichard Deeming13-Jan-17 8:29 
GeneralRe: Bind To Static Property Pin
Kevin Marois13-Jan-17 8:31
professionalKevin Marois13-Jan-17 8:31 
QuestionWPF/MVVM - How To Make A Chess Board Pin
Kevin Marois20-Dec-16 6:13
professionalKevin Marois20-Dec-16 6:13 
AnswerRe: WPF/MVVM - How To Make A Chess Board Pin
Meshack Musundi26-Dec-16 19:26
professionalMeshack Musundi26-Dec-16 19:26 
QuestionMetroTabItem View Going out of Scope Pin
JPKI13-Dec-16 12:59
JPKI13-Dec-16 12:59 
AnswerRe: MetroTabItem View Going out of Scope Pin
Pete O'Hanlon13-Dec-16 20:50
mvePete O'Hanlon13-Dec-16 20:50 
GeneralRe: MetroTabItem View Going out of Scope Pin
JPKI13-Dec-16 22:14
JPKI13-Dec-16 22:14 
GeneralRe: MetroTabItem View Going out of Scope Pin
JPKI15-Dec-16 8:33
JPKI15-Dec-16 8:33 
QuestionUserControl Pin
Kevin Marois5-Dec-16 11:02
professionalKevin Marois5-Dec-16 11:02 
AnswerRe: UserControl Pin
Jon McKee5-Dec-16 11:12
professionalJon McKee5-Dec-16 11:12 
GeneralRe: UserControl Pin
Kevin Marois5-Dec-16 11:22
professionalKevin Marois5-Dec-16 11:22 
GeneralRe: UserControl Pin
Jon McKee5-Dec-16 11:40
professionalJon McKee5-Dec-16 11:40 
GeneralRe: UserControl Pin
Kevin Marois5-Dec-16 11:46
professionalKevin Marois5-Dec-16 11:46 
GeneralRe: UserControl Pin
Jon McKee5-Dec-16 11:56
professionalJon McKee5-Dec-16 11:56 
AnswerRe: UserControl Pin
Gerry Schmitz5-Dec-16 11:29
mveGerry Schmitz5-Dec-16 11:29 
GeneralRe: UserControl Pin
Meshack Musundi5-Dec-16 22:23
professionalMeshack Musundi5-Dec-16 22:23 
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
Member 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
Member 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:
C#
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
Member 128805956-Dec-16 7:38 

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.