Strange behavior of context menu

2 posts, 1 answers
  1. Xaria D
    Xaria D avatar
    68 posts
    Member since:
    May 2010

    Posted 18 Aug 2010 Link to this post

    I have a context menu as Window.Resource with x:Shared set to true.
    Now I have two Rad Panes whose context menu is set to this resource.
    When I right click on the pane and if only one of the two panes is open the ContextMenu does not display.
    only when both panes are open the contextmenu is shown.
    Is this is a bug?
  2. Answer
    Kaloyan avatar
    920 posts

    Posted 19 Aug 2010 Link to this post

    Hi Xaria D,

    Please avoid setting a context menu to a RadPane as the RadDocking is setting an internal one that is displayed above the header containing the MenuCommands. The recommended approach is to set a ContextMenu to an element inside of the RadPane - for instance a grid. Check the following code and let us know if this is not helping you.

           <telerik:RadContextMenu x:Key="contextMenu" x:Shared="true">
               <telerik:RadMenuItem Header="Item 1" />
               <telerik:RadMenuItem Header="Item 2" />
               <telerik:RadMenuItem Header="Item 3" />
               <telerik:RadMenuItem Header="Item 4" />
                       <telerik:RadPane Header="Pane 1" Title="Pane 1">
                           <Grid Background="Transparent"
                                   telerik:RadContextMenu.ContextMenu="{StaticResource contextMenu}" />
                       <telerik:RadPane Header="Pane 2" Title="Pane 2">
                           <Grid Background="Transparent"
                                   telerik:RadContextMenu.ContextMenu="{StaticResource contextMenu}" />

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top