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

How to add button and textbox in ItemsPanel of RadTabControl

5 Answers 305 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Jihong
Top achievements
Rank 1
Jihong asked on 17 Jan 2011, 05:39 PM
I want to implement a tab control like IE9, place textbox and button at the right of tab items header. See the illustration.

http://res1.windows.microsoft.com/resbox/en/Internet%20Explorer/main/3/4/340ea7de-bd9e-4e59-ba6c-959fc8728199/340ea7de-bd9e-4e59-ba6c-959fc8728199.jpg

5 Answers, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 18 Jan 2011, 06:32 PM
Hi Jihong,

I am sending you a project based on this article for creating a close button in the TabItem`s Header.
Please give it a try and let me know how it goes. I think it is a good starting point. Please let us know if you need further assistance.

All the best,
Petar Mladenov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Jihong
Top achievements
Rank 1
answered on 21 Jan 2011, 07:06 AM
Thanks for your example. I set left margin of ItemsPanel and added ItemsPanelTemplate to move the tab item header right. Then I added a stackpanel to the same grid.row of TabControl to simulate IE9 style.

<telerik:RadTabControl.ItemsPanel>
    <ItemsPanelTemplate>
        <telerik:RadWrapPanel Margin="300,0,0,0" />
    </ItemsPanelTemplate>
</telerik:RadTabControl.ItemsPanel>
0
Steven
Top achievements
Rank 1
answered on 04 Apr 2013, 04:05 PM
Hi,

Is there a way to have the items panel not take up the entire width of the tab control so you can put other controls in the space (e.g. the IE address bar, buttons on the right hand side as per the image Jihong attached in the original post)?

We have a tab control where we would like to have some separate data always displayed at the same level as the tabs and have any tabs that don't fit accessible via scrolling. Is this possible?

Thanks,

Steven
0
Tina Stancheva
Telerik team
answered on 05 Apr 2013, 11:59 AM
Hi Steven,

At the moment the only approach for adding additional content to the RadTabControl is by editing its default ControlTemplate. As we can see how this can be inconvenient, we have logged a feature request in our PITS to add ContentPresenters in the ControlTemplate of the TabControl to support additional content. However, so far this feature hasn't gathered much feedback. But you can vote for it to increase its priority in our to-do list.

In the meantime you can take a look at the attached sample where I edited the default Template of the RadTabControl and added additional content right after the DockPanel wrapping the tabs and the scrolling buttons. Let us know if it helps.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Steven
Top achievements
Rank 1
answered on 05 Apr 2013, 02:52 PM
Hi Tina,

Thanks for the quick reply.

I had a suspicion that I would need edit the template but I thought I'd ask just to make sure.

Your attached sample was very helpful.

Thanks,

Steven
Tags
TabControl
Asked by
Jihong
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Jihong
Top achievements
Rank 1
Steven
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or