I use Template for ListBoxes sometime in WPF, but I was wondering if there is a way to create a template for ListBoxItem that will apply to all items in ListBox, but also has an ItemTemplateSelector to modify the contents of containers.
I have a list of lines and images, and I want to show them uniquely, so that the image is displayed with the frame and lines displayed in the text box for editing. I created an ItemTemplateSelector and select a template based on the type. However, I want to add some controls, such as a button for deletion, and a check box to display a selection for both templates.
I know that I can add both objects to both templates for strings or images, but I want it to be scalable and not added every time a template is added. Any thoughts?
source
share