Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to design a UserControl and a ViewModel which represents this UserControl,I want to use this UserControl in MainWindow .

my ViewModel has a ObservableCollection Atribute, I want to bind this Atribute to listbox inside UserControl , but it did not show any thing when MainWindow show up,

who could give me a simple article about it?
Posted

1 solution

I solved it by myself, DataContext is key for do that
 
Share this answer
 

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