I have close button in the header of each tab of TabControl. Tabs are created dynamically in code and a datatemplate (in which the close button was defined) is applied. Now I want close-buttons to be visible only when tab is active. Is it possible to bind button's visibility property to tabitem's activeness (probably IsSelected property)? How?
A:
It would be easier to achieve if you put close button in TabHeader template instead of datatemplate.
Denis
2010-09-17 06:44:06
Actually a datatemplate is applied as HeaderTemplate.
synergetic
2010-09-17 07:12:31
A:
The following seems to be a solution:
http://blog.thekieners.com/2010/09/08/relativesource-binding-with-findancestor-mode-in-silverlight/
synergetic
2010-09-18 11:23:30
+1
A:
Have a look Kent's solution. There's also some sample code on his blog.
Andy
2010-09-22 08:35:25
I choose your answer correct without seeing details because I already took that root and achieved what I wanted.
synergetic
2010-09-22 12:25:48