Hi,
I am working on a application where I want to achieve following using XamMenu:
Can we achieve 2 and 3 using XamMenu? Any help?
Hi elinder,
Let me know if you have any further questions on this matter.
Rather than setting the Width on "TumbPlace", set the width of "IconPlace" to Auto. The space you see in front of the text is coming from the "IconPlace" ColumnDefinition.
Hello,
Please attach the sample which displays the images as you have them applied so that I can better understand your issue.
Sincerely,
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Changing width in <ColumnDefinition x:Name="TumbPlace" Width="5" />, from 5 to Auto does not fix the text allignment. Text is still right aligning. Adding right margin to ContentPresenter fixes it but since I have Icons at top menu, so it disturbs text alignment at that level - although it works fine in child menu items.
I am attaching updated sample for your reference.
Thanks
The text currently appears to be aligned right due to the grid definitions in the MenuItemPresenter:
<ContentControl
x:Name="MenuItemPresenter"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
Foreground="#FF333333"
HorizontalContentAlignment="Left"
Visibility="Visible">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="IconPlace" Width="22"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition x:Name="TumbPlace" Width="5" />
</Grid.ColumnDefinitions>
You can change the width of the “IconPlace” from a set width of 22 to Auto so this does not take any space when an icon is not used. If you change this, you may also want to add a margin to the grid or the ContentPresenter for the header to provide some spacing.
Please let me know if you have any questions.