Using RadTabControl with Navigation

4 posts, 0 answers
  1. Alexandre
    Alexandre avatar
    10 posts
    Member since:
    May 2009

    Posted 28 Oct 2011 Link to this post

    Hi...
    I would like to create someway of navigation, that when a user clicks on a menu button, for example a RadRibbonButton, the application will dynamically create a new RadTabItem, unless that RadTabItem isn't already created.

    I want to do this using the MVVM pattern. Inside each RadTabItem, by passing a parameter, i will load a view, for example a Customer view.

    Someone could give me some tips of how to implement this?

    Thanks!
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 02 Nov 2011 Link to this post

    Hello Alexandre,

    I am not sure if I fully grasp the requirements of your scenario. But you can use an MVVM approach and databind the RadRibbonView control. Then add commands to control the actions of the RadRibbonView buttons. Also bind the RadTabControl ItemsSource and use the view model commands associated with the RadRibbonButtons to add/remove items from the RadTabControl ItemsSource collection.

    I attached a very basic sample that illustrates how to databind the RadRibbonView control and use buttons to add new RadTabItems to a RadTabControl. The project also demonstrates how to take advantage of the RadTabControl ItemTemplateSelector and ContentTemplateSelecot properties to visualize the different types of business items differently inside the RadTabControl.

    I hope it will help you get started on the implementation of your scenario.

    Kind regards,
    Tina Stancheva
    the Telerik team

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

  3. DevCraft banner
  4. Daniel
    Daniel avatar
    6 posts
    Member since:
    Sep 2012

    Posted 09 Oct 2012 Link to this post

    Hi,
    I am using PRISM + MEF + Silverlight
    I want to be able to load multiple instances of the same module in the tab control. Let's say
    Module1 in TabItem1, TabItem3 ; Module2 in TabItem2 etc.
    This means i should be able to do things with Module1 in TabItem1 without affecting TabItem3.
    Also, i want to be able to close any of the items without affecting other tab items.

    I am assuming, this has to be done with navigation.
    Could you please provide me a good approach for this and also provide me with a sample project if possible. 

    Thanks.
  5. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 12 Oct 2012 Link to this post

    Hello Daniel,

    You could take a look at the post from today in the following thread (project is attached):
    http://www.telerik.com/community/forums/wpf/tabcontrol/prism-region-activate-problem.aspx

    Hope this helps.

    All the best,
    Hristo
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top