Click here to Skip to main content
15,911,315 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: MVVM Recommendations Pin
Kevin Marois8-Nov-11 7:36
professionalKevin Marois8-Nov-11 7:36 
GeneralRe: MVVM Recommendations Pin
Tom Delany8-Nov-11 7:53
Tom Delany8-Nov-11 7:53 
AnswerRe: MVVM Recommendations Pin
Abhinav S8-Nov-11 21:38
Abhinav S8-Nov-11 21:38 
GeneralRe: MVVM Recommendations Pin
Tom Delany9-Nov-11 3:57
Tom Delany9-Nov-11 3:57 
GeneralRe: MVVM Recommendations Pin
Wayne Gaylard9-Nov-11 4:23
professionalWayne Gaylard9-Nov-11 4:23 
GeneralRe: MVVM Recommendations Pin
Tom Delany9-Nov-11 4:51
Tom Delany9-Nov-11 4:51 
GeneralRe: MVVM Recommendations Pin
Abhinav S9-Nov-11 6:41
Abhinav S9-Nov-11 6:41 
AnswerRe: MVVM Recommendations Pin
_Maxxx_14-Nov-11 17:55
professional_Maxxx_14-Nov-11 17:55 
IMHO ...
If each tab in your tabbed interface is, essentially, stand alone, and could be presented in a different way (say in a tree view, or pop-up form etc.) then you need to model that view using a view model. the fact that a particular View attached to that view model happens to sit on a tab control somewhere is 'nothing to do with' the ViewModel.

OTOH if the separation into tabs is more just a gui convenience (that is, all the tabs are necessary and inter-related) then the ViewModel should model all of the controls on all of the tabs - and the View just 'happens' to split them into tabs. Some other implementation may decide to present all of the data in one large, scrolling form, for example, still bound to the single view model.

this isn't a criticism, as I do it myself, but I believe one of the aims of using ViewModels is that you try to design the ViewModel first rather than thinking 'I want a tabbed interface' you think 'I want to perform these functions." The ViewModel contains the data to be presented/updated, and offers the functionality - then you design the view to be able to provide the interface to the user.

So in the case of the 'Management Console' style, i would think you would have several ViewModels, one for each piece of functionality, and a ManagementConsoleViewmodel that has, as properties, each of the view models it requires to perform its functionality.

The View that binds to the 'big' view model may place the smaller views on tabs, in trees, or on the sides of an animated 3D spinning cube - by binding to its view model it has access to all it needs regardless, and each of the smaller viewmodels can also be viewed in whatever way you want - and indeed can also be used independently if required.
MVVM# - See how I did MVVM my way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011

.\\axxx
(That's an 'M')

GeneralRe: MVVM Recommendations Pin
Tom Delany20-Nov-11 11:27
Tom Delany20-Nov-11 11:27 
GeneralRe: MVVM Recommendations Pin
_Maxxx_20-Nov-11 13:15
professional_Maxxx_20-Nov-11 13:15 
QuestionButton with popup submenu - like the one in toolbars Pin
Member 10339078-Nov-11 5:29
Member 10339078-Nov-11 5:29 
AnswerRe: Button with popup submenu - like the one in toolbars Pin
SledgeHammer018-Nov-11 6:45
SledgeHammer018-Nov-11 6:45 
GeneralRe: Button with popup submenu - like the one in toolbars Pin
Member 10339079-Nov-11 9:07
Member 10339079-Nov-11 9:07 
QuestionMAF Pin
columbos149278-Nov-11 4:16
columbos149278-Nov-11 4:16 
QuestionWPF Drag Drop - handling DragEnter and DragOver to disallow drop impossible? Pin
Member 10339078-Nov-11 0:51
Member 10339078-Nov-11 0:51 
AnswerRe: WPF Drag Drop - handling DragEnter and DragOver to disallow drop impossible? Pin
Mark Salsbery8-Nov-11 5:13
Mark Salsbery8-Nov-11 5:13 
GeneralRe: WPF Drag Drop - handling DragEnter and DragOver to disallow drop impossible? Pin
Member 10339078-Nov-11 5:25
Member 10339078-Nov-11 5:25 
Questionuser control within the ContentControl is center aligned Pin
indian1437-Nov-11 19:57
indian1437-Nov-11 19:57 
AnswerRe: user control within the ContentControl is center aligned Pin
Mark Salsbery8-Nov-11 5:17
Mark Salsbery8-Nov-11 5:17 
GeneralRe: user control within the ContentControl is center aligned Pin
indian1438-Nov-11 6:37
indian1438-Nov-11 6:37 
QuestionCreating a c++ cli mixed mode assembly inherited from a WPF library not possible? Pin
alleyes7-Nov-11 10:26
professionalalleyes7-Nov-11 10:26 
QuestionMdiChild Pin
columbos149276-Nov-11 22:42
columbos149276-Nov-11 22:42 
QuestionRe: MdiChild Pin
Mark Salsbery7-Nov-11 9:59
Mark Salsbery7-Nov-11 9:59 
AnswerRe: MdiChild Pin
columbos149277-Nov-11 19:33
columbos149277-Nov-11 19:33 
GeneralRe: MdiChild Pin
Mark Salsbery8-Nov-11 5:19
Mark Salsbery8-Nov-11 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.