Hide Tab Item Header

11 posts, 1 answers
  1. Brian Lampe
    Brian Lampe avatar
    3 posts
    Member since:
    May 2010

    Posted 25 May 2010 Link to this post

    We have a requirement to drive our tab control from elsewhere in the application, and so, the header tabs have become unnecessary. 

    Is there a way we can hide the tabs in a RadTabControl?  Or, is there a better control for our needs? 

    TIA

    Brian 
  2. Answer
    Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 26 May 2010 Link to this post

    Hello Brian Lampe,

    To hide the headers you may need to modify the control's Template.

    Generally if your content is available as a property and its loading will not be managed by the TabControl, you can use a ContentControl or ContentPresenter and bind its Content property to your the content supplier.

    You can also use the TransitioningContentControl which will animate the content changes.

    Indeed using the TabControl may be unnecessary just for content switching.

    Kind regards,
    Miroslav
    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. UI for WPF is Visual Studio 2017 Ready
  4. Robert
    Robert avatar
    7 posts
    Member since:
    Oct 2007

    Posted 15 Jun 2010 Link to this post

    I don't see why the Telerik support analyst did not provide example code to accomplish this?  Just speaking in generalities is not particularly helpful.  I have a similar requirement, and it would have saved me time if I had found a concrete solution here.  Instead, I will have to ask the same question via support ticket.
  5. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 16 Jun 2010 Link to this post

    Hi Robert,

    Thank you for your feedback. We are constantly trying to improve our support process and your opinion is of high importance for you. I've posted an answer to your support thread. Have a look at it and let me know if it helps.

    Greetings,
    Kiril Stanoev
    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.
  6. Adrian Pay
    Adrian Pay avatar
    28 posts
    Member since:
    Nov 2009

    Posted 24 Feb 2011 Link to this post

    again, didnt post the answer. instead, decided to forward PRIVATELY the answer to the previous poster.

    now, i have to BEG for the answer to the same question. can u just post the attachment here so everyone else who stumbles upon the same question will not need to ask AGAIN?

    hope your support improves.
  7. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 28 Feb 2011 Link to this post

    Hi Adrian Pay,

    Basically there are two approaches you can take to achieve this functionality. First, you can go in Expression Blend, edit the ControlTemplate of RadTabControl and remove (or hide) the header strip. The other way is to collapse it using the VisualTreeHelper class like this:

    public MainWindow()
    {
        InitializeComponent();
      
        Dispatcher.BeginInvoke(new Action(() =>
        {
            var root = VisualTreeHelper.GetChild(this.WizardTabs, 0) as FrameworkElement;
            var headerElement = root.FindName("HeaderDockedElement") as UIElement;
            headerElement.Visibility = System.Windows.Visibility.Collapsed;
        }), System.Windows.Threading.DispatcherPriority.ApplicationIdle);
    }

    I'm sorry for the inconvenience and hope the answer will be of help to you. Let us know if you have further questions.


    Regards,
    Hristo
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  8. ravenger
    ravenger avatar
    7 posts
    Member since:
    Oct 2010

    Posted 31 Aug 2011 Link to this post

    This code working on WPF, but it doesn't on Silverlight. Because silverlight doesn't have "DispatcherPriority.ApplicationIdle" property. 
    Without dispatcher this code didn't working when application starting, but working after application was started.
    Can you help me adapt this code to Silverlight?
  9. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 02 Sep 2011 Link to this post

    Hello Ravenger,

    You could remove the last parameter of the method and try with the Dispatcher class in SL. I tested this code and it works in my sample app:

    Dispatcher.BeginInvoke(new Action(() =>
                {
                    LayoutTransformControl a = Telerik.Windows.Controls.ChildrenOfTypeExtensions.ChildrenOfType<LayoutTransformControl>(this.thetab).FirstOrDefault();
                    if (a != null)
                    {
                        a.Visibility = System.Windows.Visibility.Collapsed;
                    }
                }));

    Hope this helps. Please, let us know if you need further assistance.Kind regards,
    Hristo
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  10. ravenger
    ravenger avatar
    7 posts
    Member since:
    Oct 2010

    Posted 02 Sep 2011 Link to this post

    Thank you
  11. Mohamed
    Mohamed avatar
    3 posts
    Member since:
    Jun 2011

    Posted 16 Dec 2011 Link to this post

    Hey this works , thank you very much . may allah bless U
  12. Gene
    Gene avatar
    11 posts
    Member since:
    Jul 2011

    Posted 22 Jan 2012 Link to this post

    Thanks, this worked like a charm and is easy to revert should the requirement change back to showing the tab headers.
Back to Top
UI for WPF is Visual Studio 2017 Ready