This question is locked. New answers and comments are not allowed.
Hi,
I'm facing an issue with the RadTabControl. In fact, when I have the number of tab is too big to be displayed in the available width, the right/left navigation stay disabled. Please have a look to the attached screenshot.
Nothing particular in my code :
TabNavigationControl.xaml
<UserControl x:Class="AS.Cpm.Silverlight.Client.UserControls.TabNavigationControl" xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation" xmlns:userControl="clr-namespace:AS.Cpm.Silverlight.Client.UserControls" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <UserControl.Resources> <Style x:Key="ClosableStyle" TargetType="telerik:RadTabItem" BasedOn="{StaticResource RadTabItemStyle}"> <Setter Property="IsEnabled" Value="{Binding IsEnabled}"/> <Setter Property="HeaderTemplate"> <Setter.Value> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <ContentControl Content="{Binding Title}" /> <telerik:RadButton Grid.Column="1" Width="16" Height="16" Margin="3 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" userControl:RoutedEventHelper.EnableRoutedClick="True" Content="x" Padding="0" IsEnabled="{Binding IsCloseEnabled}" Style="{StaticResource NoBorderRadButtonStyle}"/> </Grid> </DataTemplate> </Setter.Value> </Setter> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <Grid> <!--add a frame!--> <navigation:Frame Padding="5,5,5,5" x:Name="Frame" Source="{Binding Uri}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" JournalOwnership="OwnsJournal" Grid.Row="1" Grid.Column="1"> <navigation:Frame.UriMapper> <uriMapper:UriMapper> <uriMapper:UriMapping Uri="/ModuleExecution" MappedUri="/Views/Modules/ModuleEditionView.xaml"/> <uriMapper:UriMapping Uri="/Refresh/Module/{pageName}/{param}" MappedUri="/Views/ModuleMenu.xaml?Menu={pageName}&Refresh={param}"/> <uriMapper:UriMapping Uri="/Refresh/{pageName}/{param}" MappedUri="/Views/{pageName}View.xaml?Refresh={param}"/> <uriMapper:UriMapping Uri="/Module/{pageName}" MappedUri="/Views/ModuleMenu.xaml?Menu={pageName}"/> <uriMapper:UriMapping Uri="/FormulaEdition" MappedUri="/Views/Formulas/FormulaEditionView.xaml"/> <uriMapper:UriMapping Uri="/GeneralLedger" MappedUri="/Views/GeneralLedger/GeneralLedgerView.xaml"/> <uriMapper:UriMapping Uri="/Asp/{pageName}" MappedUri="/Views/AspPlaceHolder.xaml?Page={pageName}"/> <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}View.xaml"/> </uriMapper:UriMapper> </navigation:Frame.UriMapper> </navigation:Frame> </Grid> </DataTemplate> </Setter.Value> </Setter> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot"> </Grid></UserControl>
TabNavigationControl.xaml.cs :
private void CreateTabControl(){ LayoutRoot.Children.Clear(); _tabControl = new RadTabControl(); _tabControl.ItemContainerStyle = Resources["ClosableStyle"] as Style; _tabControl.Align = Telerik.Windows.Controls.TabControl.TabStripAlign.Right; _tabControl.IsContentPreserved = true; _tabControl.SelectedItemRemoveBehaviour = Telerik.Windows.Controls.TabControl.SelectedItemRemoveBehaviour.SelectLast; _tabControl.AllowDragReorder = true; _tabControl.SelectionChanged += _tabControl_SelectionChanged; LayoutRoot.Children.Add(_tabControl); _tabControl.ItemsSource = tabItemsModel;}
Thanks for your help,
