If I’m using the MVVM pattern – this one for my WPF application
And my project requires a search function on different sources – say clients, accountants, cases.
What would be the best way to go about it so that I only have one search view and the search results shown in the ListView are ‘dynamic’ in that they could be result for clients or accountants or cases
Should I have a base search view model and specific view models for clients, accountants, cases that then somehow set as the datacontext for the search view
try to build the grid dynamically in a code behind for the search and then somehow get the data back into the view model without the search view knowing about the view model.
The searches are separate and will not need to be combined, I would only every return results for clients or accountants or cases.