Is it possible to have a listbox displaying its items with a control template to change their look in the listbox and also have a canvas displaying the listboxItems with another look?
To be more accurate,
I have a UserControl named InfoControl and another named DesignerControl with the same DataContext: a DesignerVM which contains an ObservableCollection of CurveVM.
In my InfoControl, I have a listbox with its items binded to the OC and shown as stackpanels using a template.
Now I want to display my items in the DesignerControl (canvas) but with another look.
Should i have to create another listbox and synchronize it with the first one or is there a way to achieve my goal?
Two controls shouldn’t share a listbox. Instead, make two separate listboxes and bind them to the same ItemsSource or DataContext. Use a DataTemplateSelector to control which template is used.
Edit: And welcome to StackOverflow 🙂