1

I have to implement a design for a TabControl. This design uses a DropShadowEffect surrounding the border of the content part of that control. This shadow should overlap those elements of the TabControl that are not selected, but it should not overlap the selected item.

My first approach was to define the zIndex for the not-selected items = 1, the content container = 2 and the selected item = 3. But unfortunately this didn't work out, since the content and the tab-items are not in the same panel.

Any ideas how I can achieve the desired target?

WPF Inspector Visual Tree Screenshot:
enter image description here

I need some of those TabItems below the content and one above..

Ricibob
  • 7,505
  • 5
  • 46
  • 65
Chris
  • 527
  • 3
  • 15
  • Actually i found a workaround that is not nice but does the work. I removed the shadow from the content panel and added a rectangle to the edge of the tab-items. Without selection, this rectangle has width 1 and show the shadow. I had to move it 1px below the content panel to hide that rectangle. In selected state i reduce the size of the rectangle to 0 and the shadow disappears. But please: if you have an idea, id love to try it to get rid of this kung fu :) – Chris Apr 25 '12 at 16:41
  • I suspect you wont find a better solution that your work around (I could be wrong! - but I know relative z-order between items in different branches of the visual tree can be sticky eg http://stackoverflow.com/questions/7931134/absolute-z-order-across-several-datatemplates) – Ricibob Apr 25 '12 at 16:45

0 Answers0