This is a migrated thread and some comments may be shown as answers.

RadContextMenu crashes

1 Answer 52 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexandre
Top achievements
Rank 1
Alexandre asked on 19 Jul 2012, 07:36 PM
Hi guys,

I found a problem with the RadContextMenu when there are sub-menus and that you open the RadContextMenu at the right of your screen so that the control re-organize the menu to the left to be visible.

Here is the xaml (no code-behind):

<UserControl x:Class="SilverlightApplication7.MainPage"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"            
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
 
    <Grid x:Name="LayoutRoot" Background="White">
    <telerik:RadContextMenu.ContextMenu>
      <telerik:RadContextMenu x:Name="radCmMenuContextuel" >
        <telerik:RadMenuItem Header="Menu Contextuel">
          <telerik:RadMenuItem Header="Menu Contextuel" />
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Menu Contextuel">
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Menu Contextuel" />
        <telerik:RadMenuItem Header="Menu Contextuel">
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
          <telerik:RadMenuItem Header="Menu Contextuel" />
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Rapport">
          <telerik:RadMenuItem Header="Attribution">
            <telerik:RadMenuItem Header="2012-2013">
              <telerik:RadMenuItem Header="Période 1" />
              <telerik:RadMenuItem Header="Période 2" />
              <telerik:RadMenuItem Header="Période 3" />
              <telerik:RadMenuItem Header="Période 4" />
              <telerik:RadMenuItem Header="Période 5" />
              <telerik:RadMenuItem Header="Période 6" />
              <telerik:RadMenuItem Header="Période 7" />
              <telerik:RadMenuItem Header="Période 8" />
              <telerik:RadMenuItem Header="Période 9" />
              <telerik:RadMenuItem Header="Période 10" />
              <telerik:RadMenuItem Header="Période 11" />
              <telerik:RadMenuItem Header="Période 12" />
              <telerik:RadMenuItem Header="Période 13" />
            </telerik:RadMenuItem>
            <telerik:RadMenuItem Header="2013-2014">
              <telerik:RadMenuItem Header="Période 1" />
              <telerik:RadMenuItem Header="Période 2" />
              <telerik:RadMenuItem Header="Période 3" />
              <telerik:RadMenuItem Header="Période 4" />
              <telerik:RadMenuItem Header="Période 5" />
              <telerik:RadMenuItem Header="Période 6" />
              <telerik:RadMenuItem Header="Période 7" />
              <telerik:RadMenuItem Header="Période 8" />
              <telerik:RadMenuItem Header="Période 9" />
              <telerik:RadMenuItem Header="Période 10" />
              <telerik:RadMenuItem Header="Période 11" />
              <telerik:RadMenuItem Header="Période 12" />
              <telerik:RadMenuItem Header="Période 13" />
            </telerik:RadMenuItem>
          </telerik:RadMenuItem>          
          <telerik:RadMenuItem Header="Menu Contextuel" />
        </telerik:RadMenuItem>
        <telerik:RadMenuItem IsSeparator="True" />
        <telerik:RadMenuItem Header="Menu Contextuel" />
        <telerik:RadMenuItem Header="Menu Contextuel" />
      </telerik:RadContextMenu>
    </telerik:RadContextMenu.ContextMenu>
    </Grid>
</UserControl>


Here is the steps to reproduce the problem:
1) Open the context menu at the right of your screen.
2) Select but do not click "Rapport" -> "Attribution" -> "2012-2013" -> "Période 4"
3) From "Période 4", select "2013-2014" by following the green line in the picture attached.
4) From "Période 4", select "2013-2014" by following the red line in the picture attached.

Result:
With the green line it should work correctly.
With the red line an exception will be thrown. There seems to be a problem when crossing the menu in the back.

Exception: Object reference not set to an instance of an object.

Stack trace:
   à Telerik.Windows.Controls.RadMenuItem.OpenMenu()
   à Telerik.Windows.Controls.RadMenuItem.OnOpenTimerTick(Object sender, EventArgs e)
   à MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   à MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)

I'd like to know if there is a workaround or a possible fix for this problem.

Thanks,

Alex


1 Answer, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 20 Jul 2012, 11:52 AM
Hi,

Thank you for reporting this bug. We were able to reproduce it and we`ll check where is the problem. We are giving you 500 telerik points for your efforts.
All the best,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Menu
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or