Hi
Can you show me how to accomplish this? I think I need to set a DataTemplateSelector and have each DataTemplate a UserControl. Also I would like to bind each UserControl's data to a different ViewModel.
Thanks!
Hello Marlon,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Could you please send a sample with your data structure and screenshot of the desired results and also could you please tell me why you want to have different view models rather than have one that combine them?
Looking forward for your reply.
Hi Stefan,
Thank you for your response. However I already have a DataTemplate and TemplateSelector in my xaml file. What I need is to assign each DataTemplate's DataContext to a different ViewModel in xaml. Such that the UI elements in each DataTemplate binds to their corresponding ViewModel Properties.
Thank you,
-Marlon
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
I have modified the sample I sent you before, so now it has a ContentControl as ItemTemplate and I created a TemplateSelector for the ContentControl in order to achieve the functionality you want. Please let me know if this helps you or you have further questions on this matter.