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

RadTabItem Reorder

2 Answers 121 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
vino
Top achievements
Rank 1
vino asked on 27 Oct 2010, 11:21 AM
Hi,
 
  I am using RadTabControl. I have created RadTabItem dynamically.

RadTabItem

 

 

newTab = new RadTabItem(); 

 

 

 

 

TextBlock objTextBlock = new TextBlock(); 

 

 

 

TextBox objTextBox = new TextBox();

objTextBox.MaxLength = 

 

 

Convert.ToInt32(ApplicationStrings.TabMaxLength);

objTextBox.LostFocus += 

 

 

new RoutedEventHandler(Editable_Tb_LostFocus); 

 

 

Canvas objCanvas = new Canvas();  

 

 

objCanvas.Width = 

 

 

 

Convert.ToDouble(ApplicationStrings.TabWidth);

objCanvas.Height = 20.0;

objTextBox.Width = objCanvas.Width - 12;

objTextBlock.Width = objCanvas.Width - 12;

objTextBlock.TextAlignment = 

 

 

TextAlignment.Center;

objTextBlock.Style = 

 

 

Application.Current.Resources["TextStyle"] as Style;

objCanvas.Children.Add(objTextBlock);

objCanvas.Children.Add(objTextBox);

objCanvas.Children.Add(btnClose);
objTextBox.Text = 

 

 

ApplicationStrings.NewTabTitle + NewTabName++; 

objTextBox.Text = 

 

ApplicationStrings.NewTabTitle + NewTabName++;  

objTextBlock.Text = objTextBox.Text;

objTextBox.Visibility = 

 

 

Visibility.Collapsed;

newTab.Header = objCanvas;

newTab.MouseLeftButtonUp += 

 

 

new MouseButtonEventHandler(newTab_MouseLeftButtonUp);

newTab.MouseRightButtonDown += 

 

 

new MouseButtonEventHandler(RadTabItem_MouseRightButtonDown);

newTab.MouseRightButtonUp += 

 

 

new MouseButtonEventHandler(myDiagram_MouseRightButtonUp); 

ContentTab.Items.Add(newTab);

 

 

 

 

<

 

 

telerikNavigation:RadTabControl Grid.Row="1" AllowDragReorder="True" VerticalAlignment="Top" x:Name="ContentTab" SelectionChanged="ContentTab_SelectionChanged" PreviewSelectionChanged="ContentTab_PreviewSelectionChanged"  

 

 

 

DisplayMemberPath="Header.Children[0].Text" DropDownDisplayMode="Visible" ScrollMode="Viewport" BorderThickness="0"> 

 

 

 

<telerikNavigation:RadTabItem IsSelected="True" MouseRightButtonDown="RadTabItem_MouseRightButtonDown" MouseRightButtonUp="myDiagram_MouseRightButtonUp" MouseLeftButtonUp="newTab_MouseLeftButtonUp">  

 

 

 

<telerikNavigation:RadTabItem.Header

 

 

 

<Canvas Width="72" Height="20">   

 

 

 

<TextBlock x:Name="Show_Tb" Style="{StaticResource DefaultTextBlockStyle}" Grid.Column="0" Width="60" TextAlignment="Center" Text="Workflow1" Canvas.Left="0" Canvas.Top="0" />

 

 

 

<TextBox x:Name="Editable_Tb" Style="{StaticResource DefaultTextBoxStyle}" Grid.Column="0" Width="60" MaxLength="8" Text="Workflow1" Canvas.Left="0" Canvas.Top="0" Visibility="Collapsed" LostFocus="Editable_Tb_LostFocus" />  

 

 

 

<Button x:Name="btnCloseTab" Style="{StaticResource TabCloseButtonStyle}" Grid.Column="1" Canvas.Top="0" Canvas.Left="60" Click="btnCloseTab_Click">

 

 

 

 

 

 

<Image Name="imgClose" Width="10" Height="10" Source="Assets/Images/CloseTab.jpg" ToolTipService.ToolTip="Close"></Image 

 

 

 

</Button>

 

 

 

 

 

 

</Canvas>

 

 

 

 

</telerikNavigation:RadTabItem.Header>

 

 

 

 

 

 

 


I am reorder the tab using AllowDragReorder="True".
 while reorder tab width is reduced and header is not displayed.
Since inside the header i am using Canvas,TextBox,TextBlock,Button.

while reorder tab width is should not reduced and header should displayed. how can achieve this.

Kindly send the solution to this mail id
       jvinoth2005green@gmail.com

OS:Windows XP
Telerik version:2010.2.714.1040
Silverlight version: 4.0

Regards,
Vinoth.J

 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 01 Nov 2010, 10:51 AM
Hello vino,

There was a known issue with the tab reorder feature of the RadTabControl, but it is already fixed. You can test your application with the controls from our latest official release. If you still experience any issues, please let us know.

Greetings,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
vino
Top achievements
Rank 1
answered on 01 Nov 2010, 11:46 AM
Hi Tina Stancheva,

  Tab reorder is now working fine with ur latest versions. Thanks for ur reply.
Tags
TabControl
Asked by
vino
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
vino
Top achievements
Rank 1
Share this question
or