I have this menu items in my WPF application. I noticed big spaces between and after the menu list.
This is how it looks like in the designer:
which seemed to be just fine except, there are too much space on both sides.
Then, when I run the application, it looks like this:
Now, there are spaces all around the menu item.
Here's my XAML code:
<DockPanel>
<Menu VerticalAlignment="Center" Width="Auto" Height="Auto" DockPanel.Dock="Top">
<MenuItem Header="_File" Width="Auto" Height="Auto" FontFamily="Century Gothic" FontSize="12">
<MenuItem Header="Exit" Width="Auto" Height="20">
<MenuItem.Icon>
<materialDesign:PackIcon Kind="ExitToApp"/>
</MenuItem.Icon>
</MenuItem>
</MenuItem>
</Menu>
</DockPanel>
How can I remove spaces around the menu item?