TabControl and MVVM

3 posts, 0 answers
  1. Jeff Ballard
    Jeff Ballard avatar
    2 posts
    Member since:
    Nov 2009

    Posted 10 Apr 2010 Link to this post

    I'm using Silverlight 4 and VS 2010 (both RC) and RIA services. I'm also new to Silverlight...

    I have a page that has a Telerik RadTabControl on it. It will always have six tabs, i.e. the number of tabs is not data driven. The tabs are used for various admin functions. One tab for managing users with a grid and edit view, another that will have basic company info - just a few text boxes on it. The other tabs are similar to these two.

    I'm trying to use MVVM and can't decide on the best approach. I don't think I want one big ViewModel that handles all six tabs - that would be big, ugly and harder to maintain. Any recommendations for approaches on how to break this out? Perhaps have a ViewModel for each tab? If so, how would I (generally) go about implementing something like that? Or is there another approach that makes more sense?



  2. Valentin.Stoychev
    Valentin.Stoychev avatar
    2198 posts

    Posted 12 Apr 2010 Link to this post

    Hi Jeff Ballard,

    You can keep it simple and use set each of the tab item content into a UserControl.

    Sincerely yours,
    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. Jeff Ballard
    Jeff Ballard avatar
    2 posts
    Member since:
    Aug 2008

    Posted 13 Apr 2010 Link to this post


    Thanks for the reply.  I'd reached the same conclusion that it should work.

    I'm also going to look at using Prism so that I can use their commanding for the tab and other controls.  But as for the tab content, I am going to put that in a user control.



Back to Top