I have a problem with my mvvm project:
In my project i have a listview that contains a list of different kinds of objects, and i want to make a pop up window that will show additional info about each object. The popup shows up when you click on a item in the listView..
I have two problems with this,
Thanks...
You should bind the DataContext property of the popup to the selected item property of the viewmodel.
Also, in the popup definition, you can use DataTemplates, and its DataType property. In the popup resources, you can define a DataTemplate for each type you want to display, and configure the DataType to this type. In the content of the popup, a simple ContentControl with the Content bound to the DataContext itself will to the trick.
Hope it answered your problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.