Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working with wpf, and i have a menu with its menu items and it works. the only thing is that it's not in the right place. it's in the middle of the screen and i want it to be on the left hand side. if it was html it would be a simple alignment statement. but since it on xaml, i don't know how to specify it. this is my code:

XML
<Menu x:Name="loadsavemenu" Height="30" Width="50" Background="Transparent" >
               <MenuItem x:Name="Loadmenu"  VerticalAlignment="Top"  FontSize="14" Height="30" Width="100" Background="Transparent"   HorizontalAlignment="Left" >
                   <MenuItem.Icon>



The horizontal alignment does not work properly as it over laps some text. i would like to literally give it coordinates.

any help pls?
Posted

1 solution

It looks like you are setting the horizontal and vertical alignments on the MenuItem rather than on the Menu itself. Try setting the HorizontalAlignment of the Menu to Left. With WPF i have never really had to set exact coordinates for controls. If this doesn't work, try posting your whole xaml and I will take a look(Edit your question - don't post a reply)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900