I have a better understanding of some of the issues I’ve been experiencing with WPF on Vista. First, it appears that the display beta drivers definitely have an influence on the repaint problem I was seeing. In fact, I’ve since discovered that most of the time I don’t see it occur and it seems OK on other Vista machines.
In terms of the menus, here’s what I’m seeing. On Vista, submenu items appear to be inheriting the parent menu item’s Foreground color. In XP, on the other hand, the Foreground color does not get inheritied. I think it’s correct on XP. Compare this to the Background color which doesn’t get inherited in either XP nor Vista.
You can create a menu with submenu items in Microsoft Expression Blend and change the parent menu item’s Foreground color to see the submenu items change in real-time. Notice, again, that changing the parent’s Background color has no affect on the background colors of the child menu items.
I wrote a simple XAML app that shows what I’m seeing in Vista (with and without Glass):
and now in XP:
In the dropdown menu the menu items should not be red (I think), but they are in Vista.
I may have something goofy in my Vista installations, so here’s the test project I created and a sample app called MenuTest. If you want to give it a try on your Vista RTM machine, let me know what you see.
Here’s the XAML I’m using for the menu:
<Menu>
<MenuItem Header=”File” Foreground=”Red” Background=”Pink”>
<MenuItem Header=”Item 1″></MenuItem>
<MenuItem Header=”Item 2″></MenuItem>
<MenuItem Header=”Item 3″></MenuItem>
<MenuItem Header=”Item 4″></MenuItem>
</MenuItem>
</Menu>