WPF / MVVM: Show specific image from list of images? -


In my ViewModel I have two lists of different object types. For example, I would say that first of all the available images There is a list, second, a list of all the articles. Each article comes under an article category for which I select an article and is shown when I want to show a thumbnail in the GUI. For a simple example, I believe that the category ID is equal to the ID of this image.

This will be an easy task for the combo box: I will be assing the list of all the images in the list of items and then in the selected value the article's key to the key. The selected valuepath must point to the image's ID. Although a combo box does not understand here because I want to display only the right category image - I do not want any editing, a dropdown, etc. ... I use it in regular Image-User Control (or maybe a similar user control)?

BTW: Now I have to use an additional asset on my paragraph class which holds the right picture directly, but I think there should be a better way of solving this issue.

Any thoughts?

Regards

ralf

Your view- There is no problem in creating the acquired property which provides the image that the view should bind. The entire situation of ViewModels is to shape the model data into the appropriate structure for binding ideas.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -