Click here to Skip to main content
15,881,898 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: MVVM Master-Details project Pin
Geysser11-Mar-12 23:28
Geysser11-Mar-12 23:28 
GeneralRe: MVVM Master-Details project Pin
Mycroft Holmes12-Mar-12 1:07
professionalMycroft Holmes12-Mar-12 1:07 
GeneralRe: MVVM Master-Details project Pin
Geysser12-Mar-12 2:43
Geysser12-Mar-12 2:43 
GeneralRe: MVVM Master-Details project Pin
Pete O'Hanlon12-Mar-12 1:23
mvePete O'Hanlon12-Mar-12 1:23 
Questionmerge different pieces of a wmv files Pin
bruno.picardi10-Mar-12 9:00
bruno.picardi10-Mar-12 9:00 
QuestionUserControl Template Pin
michaelgr110-Mar-12 0:52
michaelgr110-Mar-12 0:52 
AnswerRe: UserControl Template Pin
Abhinav S10-Mar-12 19:18
Abhinav S10-Mar-12 19:18 
QuestionNext MVVM Discussion Pin
Kevin Marois9-Mar-12 6:39
professionalKevin Marois9-Mar-12 6:39 
A coworker and I were discussion the design for a WPF app. It's being built using MVVM.

We have a series of user control that are going to be added to the main window at runtime. The user controls to be added are determined by the data coming back from the repository. So for model A, add user control A, type B, add user control B, and so on. The main window's VM would call into the repository, get back a collection of models, and then for each mode, determine which user control to add to the grid in the main window.

He was adamant that the VM "should not know anything about views because this breaks the MVVM pattern." He insisted that you can do all this through data templates. he also suggested that I read up on MVVM and I'll see this is true. Now I'v read lots of MVVM artiicles and Josh Smith's book, and blogs galore. I have never hear this notion that the VM can't know about views (add views at runtime).

If you're going to add controls at runtime, then the main window VM is going to need to know about the views. I am working on another WPF app that has a toolbox and design surface (canvas). The user will be able to drag & drop controls off the toolbox onto the design surface. I don't see how this could be templated, and I'm pretty sure that there's no way to do this without the main window VM adding the controls to the main window view.

I'm open to opinions. Documentation would be good.
Everything makes sense in someone's mind

AnswerRe: Next MVVM Discussion Pin
Mycroft Holmes9-Mar-12 12:37
professionalMycroft Holmes9-Mar-12 12:37 
GeneralRe: Next MVVM Discussion Pin
Abhinav S10-Mar-12 19:16
Abhinav S10-Mar-12 19:16 
GeneralRe: Next MVVM Discussion Pin
Mycroft Holmes10-Mar-12 21:36
professionalMycroft Holmes10-Mar-12 21:36 
GeneralRe: Next MVVM Discussion Pin
Kevin Marois11-Mar-12 13:54
professionalKevin Marois11-Mar-12 13:54 
GeneralRe: Next MVVM Discussion Pin
Mycroft Holmes11-Mar-12 14:20
professionalMycroft Holmes11-Mar-12 14:20 
AnswerRe: Next MVVM Discussion Pin
Abhinav S10-Mar-12 19:12
Abhinav S10-Mar-12 19:12 
QuestionHistory of MVVM Pin
Kevin Marois8-Mar-12 10:19
professionalKevin Marois8-Mar-12 10:19 
AnswerRe: History of MVVM Pin
Pete O'Hanlon8-Mar-12 11:17
mvePete O'Hanlon8-Mar-12 11:17 
GeneralRe: History of MVVM Pin
Colin Eberhardt8-Mar-12 23:04
Colin Eberhardt8-Mar-12 23:04 
GeneralRe: History of MVVM Pin
Pete O'Hanlon8-Mar-12 23:30
mvePete O'Hanlon8-Mar-12 23:30 
GeneralRe: History of MVVM Pin
Colin Eberhardt8-Mar-12 23:38
Colin Eberhardt8-Mar-12 23:38 
GeneralRe: History of MVVM Pin
Pete O'Hanlon8-Mar-12 23:44
mvePete O'Hanlon8-Mar-12 23:44 
GeneralRe: History of MVVM Pin
Colin Eberhardt8-Mar-12 23:50
Colin Eberhardt8-Mar-12 23:50 
GeneralRe: History of MVVM Pin
Pete O'Hanlon9-Mar-12 0:04
mvePete O'Hanlon9-Mar-12 0:04 
GeneralRe: History of MVVM Pin
SledgeHammer019-Mar-12 4:40
SledgeHammer019-Mar-12 4:40 
GeneralRe: History of MVVM Pin
Pete O'Hanlon9-Mar-12 9:23
mvePete O'Hanlon9-Mar-12 9:23 
AnswerRe: History of MVVM Pin
Abhinav S8-Mar-12 19:52
Abhinav S8-Mar-12 19:52 

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.