Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
XamDockManager Backgruound Transparent
posted

I have a problem with XamDockManager. 

i want create a TabGroupPane with transparent background.

In the window preview area of Visual Studio 2008 working correctly, but when lanch application the backgroud is white.

This is the code :

 <my:XamDockManager Name="xamDockManager1" Background="Transparent" >
 <my:DocumentContentHost Background="Transparent">
  <my:SplitPane>
   <my:TabGroupPane Background="Transparent">
    <my:ContentPane Header="Primo" Background="Transparent">
     <Button Height="30">dd</Button>       
    </my:ContentPane>

    <my:ContentPane Header="Secondo" Background="Transparent">
    </my:ContentPane>
      
   </my:TabGroupPane>     
  </my:SplitPane>
 </my:DocumentContentHost>
</my:XamDockManager>

 

Thanks

Ivan Senatore

Parents
No Data
Reply
  • 54937
    Offline posted

    The default background of the Window is white so that may explain part of it. Try explicitly giving the containing panel (likely the default Grid that is the content of the Window) a different color and see how that shows through. That being said, the TabGroupPane is a complex visual and as such just setting the Background is not enough. In looking at the default template (keyed with TabGroupPane.DocumentTabGroupTemplateKey), there is a series of nested borders since the outer border provides the blue color and an inner border that provides the white. Currently that appears to be associated with SystemColors.WindowBrushKey so while you could redefine that color (by putting a brush in the resources with that as its key), that would affect other things within the element (e.g. textboxes). It seems that this inner border should be tied to the background (which means the blue would still just be controlled via resource keys). Is that what you were expecting?

Children