Contextmenu with a submenu

Hi,

I have a context menu, which includes several menuitemadv. I want to include a submenu.

I gave a MenuItemAdv  named "MenuDesign" and want to MenuItemAdv  items as submenu.


I did it like this:

 <ContextMenu PreviewKeyUp="ContextMenu_PreviewKeyUp" x:Key ="PCCheckerContextMenu">

<syncfusion:MenuItemAdv x:Name="MenuDesign" Header="Design anpassen" Height="45" >

                <syncfusion:MenuItemAdv.Icon>

                    <Image

                        Width="32"

                        Height="32"

                        Source="/images/window_32.png" />

                </syncfusion:MenuItemAdv.Icon>


                <syncfusion:MenuItemAdv x:Name="MenuBackground" Header="Hintergrund anpassen" Height="45" Click="MenuBackground_Click" IsCheckable="true">

                        <syncfusion:MenuItemAdv.Icon>

                            <Image

                                Width="32"

                                Height="32"

                                Source="/images/window_32.png" />

                        </syncfusion:MenuItemAdv.Icon>

                    </syncfusion:MenuItemAdv>

                    <syncfusion:MenuItemAdv x:Name="MenuAnzeige" Header="Anzeige anpassen" Height="45" Click="MenuAnzeige_Click" IsCheckable="true">

                            <syncfusion:MenuItemAdv.Icon>

                                <Image

                                    Width="32"

                                    Height="32"

                                    Source="/images/anzeige_32.png" />

                            </syncfusion:MenuItemAdv.Icon>

                    </syncfusion:MenuItemAdv>

            </syncfusion:MenuItemAdv>

          

Problem is " MenuDesign " is shown, but arrow for the submenu and also the two submenuitems are not shown. Isn't this possible within a submenu ?

Thanks and regards



1 Reply

KA Karthick Arjunan Syncfusion Team January 3, 2023 03:24 PM UTC

Hi,

We would like to inform that the MenuItemAdv is specifically designed to be used with the Syncfusion MenuAdv control. If you attempt to use it within a ContextMenu, it will be set as the content of the framework's MenuItem. Since, it will not function in the same way as a regular MenuItem and some features may not work properly.


Loader.
Up arrow icon