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

Center Menu Items

$
0
0

Hi,

I have a Menu control in my window and I am adding Menu Items to the Menu control. I am trying to figure out how to center those Menu Items within my Menu. 

Here is a screenshot:

My Menu Items are 16 x 16 in size and my Menu control is 32 x 32 in size. I want the Menu Item's to sit snug inside the Menu control, VerticalAlignment doesn't seem to work in my Menu Item tags. I've also tried adding a Grid in my Menu control and putting the Menu Item's inside that Grid but then the Menu Item's aren't stacked horizontally anymore (they are placed on top of each other). 

Do I need to edit the Menu control Style or the Menu Item Style?



Viewing all articles
Browse latest Browse all 18858

Trending Articles



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