RadTabItem Reorder

3 posts, 1 answers
  1. vino
    vino avatar
    4 posts
    Member since:
    Oct 2010

    Posted 27 Oct 2010 Link to this post

    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. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 01 Nov 2010 Link to this post

    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
  3. DevCraft banner
  4. vino
    vino avatar
    4 posts
    Member since:
    Oct 2010

    Posted 01 Nov 2010 Link to this post

    Hi Tina Stancheva,

      Tab reorder is now working fine with ur latest versions. Thanks for ur reply.
Back to Top