Click here to Skip to main content
16,004,479 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 5:15
Sutton Mehaffey12-Mar-12 5:15 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Pete O'Hanlon12-Mar-12 5:22
mvePete O'Hanlon12-Mar-12 5:22 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 5:32
Sutton Mehaffey12-Mar-12 5:32 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 15:33
Sutton Mehaffey12-Mar-12 15:33 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Pete O'Hanlon12-Mar-12 22:32
mvePete O'Hanlon12-Mar-12 22:32 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey13-Mar-12 2:52
Sutton Mehaffey13-Mar-12 2:52 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Pete O'Hanlon13-Mar-12 3:11
mvePete O'Hanlon13-Mar-12 3:11 
QuestionSliver light Pin
mehul_porject11-Mar-12 19:32
mehul_porject11-Mar-12 19:32 
AnswerRe: Sliver light Pin
Abhinav S11-Mar-12 19:56
Abhinav S11-Mar-12 19:56 
QuestionMVVM Master-Details project Pin
Geysser10-Mar-12 23:41
Geysser10-Mar-12 23:41 
AnswerRe: MVVM Master-Details project Pin
Abhinav S11-Mar-12 19:57
Abhinav S11-Mar-12 19:57 
AnswerRe: MVVM Master-Details project Pin
Mycroft Holmes11-Mar-12 21:21
professionalMycroft Holmes11-Mar-12 21:21 
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 

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.