TabStrip Text Direction

4 posts, 0 answers
  1. Scott Anderson
    Scott Anderson avatar
    9 posts
    Member since:
    Aug 2009

    Posted 21 Nov 2009 Link to this post

    If I set the TabStripAlignment to left, the text is vertical but switches reading direction depending upon whether the toolwindows are pinned or not pinned.

    Please see the 2 attached images and it will be very clear. (I marked the pinned tabs with green and the unpinned/autohide tabs with red.)

    My question is how can I make the text read the same way and stop the switching?

    I have not found any properties that causes/controls this.

  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 25 Nov 2009 Link to this post

    Hello Scott Anderson,

    You can use this code snippet:

    private void MainForm_Load(object sender, EventArgs e)
    {
        RootRadElement rootElement = this.radDock1.RootElement;
        AutoHideTabStripElement autoHideElement = rootElement.Children[0].Children[2].Children[2] as AutoHideTabStripElement;   //left AutoHideTabStripElement
        if (autoHideElement != null)
        {
            autoHideElement.AngleTransform = 180;
        }
    }

    For the future version of RadDock we will simplify this API.

    Regards,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Scott Anderson
    Scott Anderson avatar
    9 posts
    Member since:
    Aug 2009

    Posted 25 Nov 2009 Link to this post

    Julian,

    Thanks for your reply.

    That solution worked, well, sort of.

    The text is the same direction but the tabs are now at the bottom of the left panel instead of at the top.

    Please see the attached screen shots.

    Is there another property that will fix this?

  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 27 Nov 2009 Link to this post

    Hi Scott Anderson,

    Currently - for this particular scenario - you can use this workaround:

    private void MainForm_Load(object sender, EventArgs e)
    {
        LayoutLeftAutoHideTabStrip();
    }
     
    private void LayoutLeftAutoHideTabStrip()
    {
        RootRadElement rootElement = this.radDock1.RootElement;
        AutoHideTabStripElement autoHideElement = rootElement.Children[0].Children[2].Children[2] as AutoHideTabStripElement;
        if (autoHideElement != null)
        {
            autoHideElement.AngleTransform = 180;
            int itemsWidth = 0;
            foreach (TabItem tabItem in autoHideElement.Items)
            {
                itemsWidth += tabItem.Size.Width;
            }
     
            autoHideElement.ItemsOffset = this.radDock1.Height - (itemsWidth + 30);
        }
    }
     
    protected override void OnResize(EventArgs e)
    {
        base.OnResize(e);
     
        LayoutLeftAutoHideTabStrip();
    }

    We will simplify this API in the future.

    Kind regards,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top