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

TabStrip Text Direction

3 Answers 73 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Scott Anderson
Top achievements
Rank 1
Scott Anderson asked on 21 Nov 2009, 09:18 PM
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.

3 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 25 Nov 2009, 02:39 PM
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.
0
Scott Anderson
Top achievements
Rank 1
answered on 25 Nov 2009, 06:05 PM
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?

0
Julian Benkov
Telerik team
answered on 27 Nov 2009, 11:05 AM
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.
Tags
Dock
Asked by
Scott Anderson
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Scott Anderson
Top achievements
Rank 1
Share this question
or