Show/Hide TabItems on click at TabItemHeader Toggle button

2 posts, 0 answers
  1. Amit
    Amit avatar
    1 posts
    Member since:
    Sep 2011

    Posted 02 May 2012 Link to this post

    Hi,

    I want to create a control where I have fixed number of tabs and all tabs content is hidden initially. Now when I click on any of the TabItemHeader, the content of that tabitem should slide out. This should be easy, but the point where I am stuck is, I want to hide the tabitem content when I again click on the same tabitem header.

    So I want to use TabControl because I want to make only 1 tabitem visible at any point of time. But the extra functionality I want is to hide the content of all the tabs. It would be really great if you can give any pointers in that direction. Even if you can guide for a better way to achieve the same using any other control than TabControl, it would be great.

    Regards,
    Amit
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 04 May 2012 Link to this post

    Hello Amit,
    I thing there are two ways to do what you're looking for:
    - you can use our RadTabControl, add some mouse handlers (you can do this in XAML or change their default template and do it there if you're using business objects) and some custom logic.
    - you can use a couple of buttons and the RadTransitionControl. In this case you could directly change the content of the Transition control on Click/Checked and etc.
    I've attached a sample project which shows both approaches so could you please examine it and if you have more questions feel free to ask.

    All the best,
    Zarko
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top