Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
Hello can u say me how i can decide one problem with ListBox In WPF.
I have data in XML i loaded them in List<string> then i used binding
C#
listBox1.DataContext = wordNow;
i'd like to change value in listbox when i'm clicking on it, for instanse it displays "word1" when i click on it then it will changes to "wordTwo"
Posted
Comments
Sergey Alexandrovich Kryukov 11-Mar-12 14:32pm    
Not a question. What did you try so far and why it seems to be a problem? It should be straightforward.
--SA
Abbath1349 11-Mar-12 14:35pm    
I tryed 2 ways:
1) get SelectedIndex and them listbox.items[index]="Word".
2) change List and binding again
Shahin Khorshidnia 11-Mar-12 17:38pm    
Very vague.
I didn't understand it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900