I\'m working on a tool and want to add a close button to the tabs in a TabControl. I can\'t figure out how to make the Command property of the button bind to the appropriate
Maybe this could work for you, all along those lines...
Bind Button's data context (or anywhere else you might need)...
DataContext="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext}"
This providing you have a window somewhere 'above' it.
Or if you have specific Name
you can use ElementName
similarly to RelativeSource
.
Hope this helps