RadMenu doesn't close properly after navigating to another tab.

2 posts, 0 answers
  1. Rob
    Rob avatar
    238 posts
    Member since:
    Jan 2009

    Posted 16 Jun 2009 Link to this post

    Hello again.  In my project, I have a Silverlight TabControl consisting of 3 tabs.  On the first tab, there is a RadToolBar which has a RadMenu inside it.  The RadMenu is structured like this: (I hope you can guess what they should do)

    Go To...
       -Tab 1
       -Tab 2
       -Tab 3

    Try this sequence of steps.
    1) Hover over the "Go To..." item and notice that the RadMenu opens to show subitems.
    2) Move your mouse away from the "Go To..." item wihtout crossing any of the subitems and notice that the RadMenu closes.
    3) Hover over the "Go To..." item and notice that the RadMenu opens to show subitems.
    4) Move your mouse away from the "Go To..."  while crossing the subitems and then exit the menu area and notice that the RadMenu closes.
    5) Hover over the "Go To..." item and select "Tab 2".  Notice that you are directed to "Tab 2".
    6) Go back to "Tab 1" by selecting it manually.
    7) Now Hover over the "Go To..." but don't hover any of the sub items.  Move your mouse away from the menu and you'll notice that the RadMenu doesn't close.

    I have included a sample project here for your research.  (Note that I am using Silverlight 3...)

    1 <UserControl x:Class="SilverlightApplication43.MainPage"  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
    2 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
    3 xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    4 xmlns:RadNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    5 > 
    6  
    7     <Grid x:Name="LayoutRoot" Background="White" Margin="50">  
    8  
    9         <Grid.RowDefinitions> 
    10             <RowDefinition Height="1*" /> 
    11         </Grid.RowDefinitions> 
    12           
    13         <Grid.ColumnDefinitions> 
    14             <ColumnDefinition Width="1*" /> 
    15         </Grid.ColumnDefinitions> 
    16           
    17         <Controls:TabControl> 
    18               
    19               
    20             <Controls:TabItem x:Name="Tab1" Header="Tab 1">  
    21  
    22                 <Grid Background="Aqua">  
    23  
    24                     <Grid.RowDefinitions> 
    25                         <RowDefinition Height="Auto" /> 
    26                         <RowDefinition Height="1*" /> 
    27                     </Grid.RowDefinitions> 
    28  
    29                     <Grid.ColumnDefinitions> 
    30                         <ColumnDefinition Width="1*" /> 
    31                     </Grid.ColumnDefinitions> 
    32                       
    33                     <RadNav:RadToolBarTray Grid.Row="0" Grid.Column="0">  
    34                           
    35                         <RadNav:RadToolBar> 
    36                               
    37                             <RadNav:RadMenu> 
    38  
    39                                 <RadNav:RadMenuItem Header="Go To...">  
    40                                       
    41                                     <RadNav:RadMenuItem Header="Tab 1" Click="RadMenuItem_GoTo" Tag="Tab1" IsEnabled="False" /> 
    42  
    43                                     <RadNav:RadMenuItem Header="Tab 2" Click="RadMenuItem_GoTo" Tag="Tab2"/>  
    44  
    45                                     <RadNav:RadMenuItem Header="Tab 3" Click="RadMenuItem_GoTo" Tag="Tab3"/>  
    46                                   
    47                                 </RadNav:RadMenuItem> 
    48  
    49                             </RadNav:RadMenu> 
    50                               
    51                         </RadNav:RadToolBar> 
    52                           
    53                     </RadNav:RadToolBarTray> 
    54  
    55                     <TextBlock Grid.Row="1" Grid.Column="0" Text="Tab 1" HorizontalAlignment="Center" VerticalAlignment="Center" /> 
    56  
    57                 </Grid> 
    58                   
    59             </Controls:TabItem> 
    60  
    61               
    62             <Controls:TabItem x:Name="Tab2" Header="Tab 2">  
    63  
    64                 <Grid Background="Pink">  
    65  
    66                     <Grid.RowDefinitions> 
    67                         <RowDefinition Height="1*" /> 
    68                     </Grid.RowDefinitions> 
    69  
    70                     <Grid.ColumnDefinitions> 
    71                         <ColumnDefinition Width="1*" /> 
    72                     </Grid.ColumnDefinitions> 
    73  
    74                     <TextBlock Text="Tab 2" HorizontalAlignment="Center" VerticalAlignment="Center" /> 
    75  
    76                 </Grid> 
    77                   
    78             </Controls:TabItem> 
    79  
    80               
    81             <Controls:TabItem x:Name="Tab3" Header="Tab 3">  
    82  
    83                 <Grid Background="Yellow">  
    84  
    85                     <Grid.RowDefinitions> 
    86                         <RowDefinition Height="1*" /> 
    87                     </Grid.RowDefinitions> 
    88  
    89                     <Grid.ColumnDefinitions> 
    90                         <ColumnDefinition Width="1*" /> 
    91                     </Grid.ColumnDefinitions> 
    92  
    93                     <TextBlock Text="Tab 3" HorizontalAlignment="Center" VerticalAlignment="Center" /> 
    94  
    95                 </Grid> 
    96  
    97             </Controls:TabItem> 
    98  
    99               
    100         </Controls:TabControl> 
    101           
    102     </Grid> 
    103  
    104 </UserControl> 
    105  

    1 using System;  
    2 using System.Windows;  
    3 using System.Windows.Controls;  
    4  
    5 namespace SilverlightApplication43  
    6 {  
    7     public partial class MainPage : UserControl  
    8     {  
    9         public MainPage()  
    10         {  
    11             InitializeComponent();  
    12         }  
    13  
    14         private void RadMenuItem_GoTo(object sender, RoutedEventArgs e)  
    15         {  
    16           
    17             FrameworkElement item = sender as FrameworkElement;  
    18  
    19             if ((item.Tag as String).Equals("Tab1"))  
    20                 this.Tab1.IsSelected = true;  
    21  
    22             else if ((item.Tag as String).Equals("Tab2"))  
    23                 this.Tab2.IsSelected = true;  
    24  
    25             else if ((item.Tag as String).Equals("Tab3"))  
    26                 this.Tab3.IsSelected = true;  
    27  
    28         }  
    29       
    30     }  
    31 }  
    32  
  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 19 Jun 2009 Link to this post

    Hello Rob,

      We tested the issue and we were able to reproduce it. Thank you for the very detailed steps and the code. We still can't find what the problem might be but we will keep investigating. Most probably the fix won't be available in Q2 as we have planned too much things to do for the little time left. However, we will do our best to include it shortly after Q2.

     Thank you again for the report. I have given you 1000 Telerik points.

    Best wishes,
    Boyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
Back to Top