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...)
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; | |
} | |
} | |
} | |