Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

MenuItem looks different in Windows 8 vs previous versions

$
0
0

I have a .NET 4.5 app with some menus in it.  When I run it on Windows 7, the MenuItems look different than they do in Windows 8.  I made a little toy app to remove any of my other custom styling from the picture and can reproduce the difference easily.  Can anyone help?  Here's some toy code:

<Window x:Class="MenuTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525"><Grid Background="LightGray"><StackPanel Orientation="Vertical"><MenuItem Header="asdf" Background="White" /><MenuItem Header="asdf" Background="White" /><MenuItem Header="asdf" Background="White" /><MenuItem Header="asdf" Background="White" /></StackPanel></Grid></Window>
When run on Windows 7, all the MenuItems appear in a contiguous block with a white background.  On Windows 8, there is a little bit of spacing where the gray background shows through between each MenuItem, which makes it pretty ugly.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>