TabItem visibility

2 posts, 0 answers
  1. Marek
    Marek avatar
    48 posts
    Member since:
    Aug 2005

    Posted 26 Nov 2007 Link to this post

    Hi
    I need to be able to hide and show tabs depending on various criteria.  I thought it would be enough to use Visibility = ElementVisibility.Hidden, which does indeed hide the tab, but its place is not taken up by the following tab. 

    The functionality I need is that when tab1 is hidden, it is made invisible and for tab2 to move to the left, taking tab1's place.  When making it visible again I need the tab to appear again and for tab2 to be shifted to the right.

    I've tried calling PerformLayout() without success.

    Please could you tell me the official way of achieving this effect.

    Best regards

    Marek
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 26 Nov 2007 Link to this post

    Hello Marek,

    In your case, you should use the Collapsed state rather than the Hidden one.

    The Hidden state means that the item is not shown but its bounds are still calculated in the layout logic. The Collapsed state is similar to an advanced hidden state, i.e the item is not shown and its bounds are not taken into account.

    If you have futher questions, do not hesitate to contact us.

     
    Sincerely yours,
    Nikolay
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top