views:

114

answers:

1

First, so you know, 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?

Thanks,

Jeff

A: 

We have recently done something similar to this. We have a ViewModel for the page with the tab control. Then, the content of each tab is a user control, which has it's own ViewModel.

JSprang