What is the proper way of adding a '+' button tab at the end of all the tab items in the tab strip of a tab control in WPF?
- It should work correctly with multiple tab header rows.
- It should be at the end of all tab items
- Tab cycling should work correctly (Alt + Tab), that is, the
+
tab should be skipped. - I shouldn't have to modify the source collection I am binding to. That is, the control should be reusable.
- The solution should work with MVVM
To be more precise, the button should appear exactly as an additional last tab and not as a separate button somewhere on the right of all tab strip rows.
I am just looking for the general approach to doing this.
Google throws many examples, but if you dig a little deep none of them satisfy all the above five points.
Best Answer
An almost complete solution using IEditableCollectionView:
It's almost complete, because the tab cycle doesn't skip the '+' tab, and will show empty content (which is not exactly great, but I can live with it until a better solution come around...).