RadContextMenu crashes

2 posts, 0 answers
  1. Alexandre
    Alexandre avatar
    8 posts
    Member since:
    Feb 2012

    Posted 19 Jul 2012 Link to this post

    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


  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 20 Jul 2012 Link to this post

    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.

  3. DevCraft banner
Back to Top