[Help] Alternating Backgrounds on WPF TreeViewItems
I have a separate resource dictionary setup that templates the controls the way I want.
How would I implement an alternating background in this dictionary? I see the AlternatingIndex for ItemsControl but it says it doesn't exist in treeview.
Or preferably I'd really like to be able to specify a datatemplateselector for each item based on the binding.
I tried applying the backgrounds on each hierarchicaldatatemplate but the color doesn't stretch across the treeview's width.
Can controls in a resource library access the databinding? If so I think I could just add a dataTemplateSelector onto the contentpresenter in the resource right?
0 comments:
Post a Comment