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

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

1 Answer 92 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 16 Jun 2009, 03:48 PM
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...)

<UserControl x:Class="SilverlightApplication43.MainPage"  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
xmlns:RadNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
> 
 
    <Grid x:Name="LayoutRoot" Background="White" Margin="50">  
 
        <Grid.RowDefinitions> 
            <RowDefinition Height="1*" /> 
        </Grid.RowDefinitions> 
          
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="1*" /> 
        </Grid.ColumnDefinitions> 
          
        <Controls:TabControl> 
              
              
            <Controls:TabItem x:Name="Tab1" Header="Tab 1">  
 
                <Grid Background="Aqua">  
 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="Auto" /> 
                        <RowDefinition Height="1*" /> 
                    </Grid.RowDefinitions> 
 
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="1*" /> 
                    </Grid.ColumnDefinitions> 
                      
                    <RadNav:RadToolBarTray Grid.Row="0" Grid.Column="0">  
                          
                        <RadNav:RadToolBar> 
                              
                            <RadNav:RadMenu> 
 
                                <RadNav:RadMenuItem Header="Go To...">  
                                      
                                    <RadNav:RadMenuItem Header="Tab 1" Click="RadMenuItem_GoTo" Tag="Tab1" IsEnabled="False" /> 
 
                                    <RadNav:RadMenuItem Header="Tab 2" Click="RadMenuItem_GoTo" Tag="Tab2"/>  
 
                                    <RadNav:RadMenuItem Header="Tab 3" Click="RadMenuItem_GoTo" Tag="Tab3"/>  
                                  
                                </RadNav:RadMenuItem> 
 
                            </RadNav:RadMenu> 
                              
                        </RadNav:RadToolBar> 
                          
                    </RadNav:RadToolBarTray> 
 
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="Tab 1" HorizontalAlignment="Center" VerticalAlignment="Center" /> 
 
                </Grid> 
                  
            </Controls:TabItem> 
 
              
            <Controls:TabItem x:Name="Tab2" Header="Tab 2">  
 
                <Grid Background="Pink">  
 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="1*" /> 
                    </Grid.RowDefinitions> 
 
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="1*" /> 
                    </Grid.ColumnDefinitions> 
 
                    <TextBlock Text="Tab 2" HorizontalAlignment="Center" VerticalAlignment="Center" /> 
 
                </Grid> 
                  
            </Controls:TabItem> 
 
              
            <Controls:TabItem x:Name="Tab3" Header="Tab 3">  
 
                <Grid Background="Yellow">  
 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="1*" /> 
                    </Grid.RowDefinitions> 
 
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="1*" /> 
                    </Grid.ColumnDefinitions> 
 
                    <TextBlock Text="Tab 3" HorizontalAlignment="Center" VerticalAlignment="Center" /> 
 
                </Grid> 
 
            </Controls:TabItem> 
 
              
        </Controls:TabControl> 
          
    </Grid> 
 
</UserControl> 
 

using System;  
using System.Windows;  
using System.Windows.Controls;  
 
namespace SilverlightApplication43  
{  
    public partial class MainPage : UserControl  
    {  
        public MainPage()  
        {  
            InitializeComponent();  
        }  
 
        private void RadMenuItem_GoTo(object sender, RoutedEventArgs e)  
        {  
          
            FrameworkElement item = sender as FrameworkElement;  
 
            if ((item.Tag as String).Equals("Tab1"))  
                this.Tab1.IsSelected = true;  
 
            else if ((item.Tag as String).Equals("Tab2"))  
                this.Tab2.IsSelected = true;  
 
            else if ((item.Tag as String).Equals("Tab3"))  
                this.Tab3.IsSelected = true;  
 
        }  
      
    }  
}  
 

1 Answer, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 19 Jun 2009, 03:51 PM
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.
Tags
Menu
Asked by
Rob
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Share this question
or