How to add button and textbox in ItemsPanel of RadTabControl

6 posts, 1 answers
  1. Jihong
    Jihong avatar
    7 posts
    Member since:
    Aug 2010

    Posted 17 Jan 2011 Link to this post

    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
  2. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 18 Jan 2011 Link to this post

    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>>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jihong
    Jihong avatar
    7 posts
    Member since:
    Aug 2010

    Posted 21 Jan 2011 Link to this post

    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>
  5. Steven
    Steven avatar
    37 posts
    Member since:
    Jul 2012

    Posted 04 Apr 2013 Link to this post

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

    Posted 05 Apr 2013 Link to this post

    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.

  7. Steven
    Steven avatar
    37 posts
    Member since:
    Jul 2012

    Posted 05 Apr 2013 Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready