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
Using Infragistics default style for XamContextMenu, menu item checkboxes no longer checkable
posted

I am using Infragistics default style for XamContextMenu, after setting the  context menu as follows,

<ig:XamContextMenu Name="_navigatorContextMenu"
Style="{StaticResource DarkContextMenuStyle}"
ItemContainerStyle="{StaticResource PurpleMenuItemStyle}"
Opening="XamContextMenu_Opening">

menu item checkboxes no longer checkable. If I remove the ItemContainerStyle="{StaticResource PurpleMenuItemStyle}", they are again checkable.

I have attached sample showing this issue. Run the sample and right-click the menu to see the context menu. All the items should show initially checked but none of them are and user cannot click to change the state of the checkbox. If you remove the ItemContainerStyle="{StaticResource PurpleMenuItemStyle}" from the XamContextMenu XAML you will see the checkmarks.

I tried  playing with the section (below) in default style supplied by Infragistics but can't get the behavior to function correctly.

<ContentPresenter x:Name="HeaderCheckboxPresenter"
Margin="4,3,4,3"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Visibility="{TemplateBinding CheckBoxVisibilityResolved}">
<ContentPresenter.ContentTemplate>
<DataTemplate>
<CheckBox IsHitTestVisible="False" IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked, Mode=TwoWay}"/>
</DataTemplate>
</ContentPresenter.ContentTemplate>
</ContentPresenter>

Please see attached file XamMenuFun.zip for the sample demonstrating the issue.

Thank you for any help.

--Pat

xamMenuFun.zip
Parents Reply Children
No Data