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
80
Problems with XamContextMenu
posted

I am having a problem with XamContextMenu. I've just started to look at it but at the moment I cannot get it to work at all.

I am using the most basic example straight from the documentation:

        <TextBox Height="23" HorizontalAlignment="Left" Margin="68,30,0,0" Name="textBox1" VerticalAlignment="Top" Width="120">

            <ig:ContextMenuService.Manager>

                <!--If you use the Infragistics Commanding Framework, you should set the OpenMode property to None-->

                <ig:ContextMenuManager ModifierKeys="Shift" OpenMode="RightClick">

                    <ig:ContextMenuManager.ContextMenu>

                        <ig:XamContextMenu Name="contextMenu2">

                            <ig:XamMenuItem Header="Font" />

                            <ig:XamMenuItem Header="Formatting" />

                        </ig:XamContextMenu>

                    </ig:ContextMenuManager.ContextMenu>

                </ig:ContextMenuManager>

            </ig:ContextMenuService.Manager>

        </TextBox>

When I run this and try to invoke the context menu (Shift + Right mouse click), I get a run-time exception:

Unable to cast object of type 'Infragistics.Controls.Menus.XamContextMenu' to type 'Infragistics.Controls.Menus.XamMenu'.

I am using InfragisticsWPF4.v10.3 library. I have tried it for different controls - no luck, the same exception.

What is wrong here?

Parents
  • 5595
    posted

    Hi,

    I tried to reproduce your issue but without success. Could you please let me know the build number you are using - it can be seen as the 'Version' property of any of our assemblies, e.g. 10.3.20103.2065?

    Could you provide any other additional information, maybe something about your page and other controls on it, etc. Ideally, you could send me a separate project sample where the issue is reproducible.

     

    Thanks,

Reply Children