Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Arrow indicator not displayed when menu item has children
posted

I am using the Infragistics default style for XamContextMenu and I am having two issues I can't solve: (1) I believe it is interfering with the display of the arrow indicator that should appear at the right of context menu items when there are sub-menu items. And (2) the sub-menu item backgrounds only paint half the menu item header.

I've attached a sample that demonstrates the issue. If you run the sample and right-click the menu, the context menu displays. Three of the root menu items have child menus but do not show the arrow indicator (issue #1). When you expand a root menu item with children (e.g. Item Data), the background is only half painted (issue #2).

For (1), the style has a section for the arrow indicator,

<!-- Arrow indicator presenter-->
<Grid Grid.Column="2"
x:Name="ArrowPanel"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Visibility="Collapsed">

<Path
Fill="Black"
x:Name="ArrowPanelPath"
VerticalAlignment="Center"
Margin="7,0,7,0"
Data="M0,0 L0,8 L4,4 z"/>
</Grid>

I know the element in bold above is the issue, but changing it to Visible puts an arrow for all menu items regardless of whether they have children. I tried using data triggers bound to the XamMenuItem.HasChildren property, but couldn't get it to work. Can you tell me how to get arrows when a root menu item has children?

For (2), I don't really have any ideas. Why are the sub-menu items only having half the header area painted with our imenu item style background color?

Thank you for any help.

--Pat

xamMenuFun.zip