Wiki Link: [discussion:4846]
WindowChrome surface renders white or black 

Jul 19 2011 at 10:07 PM
I've been applying the WindowChrome setting to my custom window styles.

<Setter Property="Shell:WindowChrome.WindowChrome">
<Setter.Value>
<Shell:WindowChrome
ResizeBorderThickness="6"
CaptionHeight="17"
CornerRadius="6,6,0,0"
GlassFrameThickness="0"
/>
</Setter.Value>
</Setter>

When I use that value, the background/glass/surface renders BLACK. However, I applied the same values to another window, via C# in the constructor, and the surface renders WHITE. Any ideas?? The white, for me, hides the pixelated corner radius on my top window corners, which visually looks better. Where is the color being defined, or any ideas why one renders differently?

private void InitializeWindowChrome()
{
var chrome = new WindowChrome
{
ResizeBorderThickness = new Thickness(6),
CaptionHeight = 17,
CornerRadius = new CornerRadius(6, 6, 0, 0),
GlassFrameThickness = new Thickness()
};

WindowChrome.SetWindowChrome(this, chrome);
}


Thanks,

Brett

Jul 19 2011 at 10:08 PM
It's also fair to note that, when I remove the XAML based style value and do it in C#, the surface renders BLACK. The other window, which renders a white surface, doesn't have a default style or any style applied, not sure if that matters.

Coordinator
Jul 19 2011 at 10:48 PM
It's probably the Window's Background brush.


Updating...
Page view tracker