Click here to Skip to main content
15,892,161 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Multiple xap files after rename Pin
Abhinav S14-Nov-10 2:54
Abhinav S14-Nov-10 2:54 
AnswerRe: Multiple xap files after rename Pin
RobCroll14-Nov-10 10:29
RobCroll14-Nov-10 10:29 
GeneralRe: Multiple xap files after rename Pin
Mycroft Holmes14-Nov-10 13:14
professionalMycroft Holmes14-Nov-10 13:14 
GeneralRe: Multiple xap files after rename Pin
RobCroll14-Nov-10 13:38
RobCroll14-Nov-10 13:38 
GeneralRe: Multiple xap files after rename Pin
Mycroft Holmes14-Nov-10 13:54
professionalMycroft Holmes14-Nov-10 13:54 
QuestionSilverlight UserControl DependencyProperty in binding Pin
Adriaan Davel12-Nov-10 0:58
Adriaan Davel12-Nov-10 0:58 
QuestionRe: Silverlight UserControl DependencyProperty in binding Pin
Adriaan Davel15-Nov-10 21:55
Adriaan Davel15-Nov-10 21:55 
QuestionNot specifically MVVM Question - separation by project Pin
_Maxxx_12-Nov-10 0:18
professional_Maxxx_12-Nov-10 0:18 
I am playing with MVVM.
I'd like to have :
Views in their own project - so I can hive off the project to designers
ViewModels in their own project - which should essentialy serve as teh developers version of the Gui (i.e. the developers don't need to know what it looks like, just make sure the data is provided and updated and functions provided)
Models in their own project - because it seems sensible to me.

Now in addition to all this, it would seem logical to me to have a Controller.

By this I mean a singleton class that 'controls' the application - it provides views and viewmodels, links them together and provides functionality for the viewmodels (e.g. using services to get data, store data, and acting as a 'communicator' between viewmodels (by messaging or events or whatever)

Now it's late and I am tired (and fairly thick), so I am probably missing something really obvious, but where can I stick my controller class?

The View project needs a reference to the ViewModel project (for binding)
The Controller needs a reference to both the ViewModel and View projects (as the controller will instantiate them both)
The controller needs a reference to the model project (so it can make the model data available to the ViewModels)

But (and here's the crux of my problem) the ViewModel needs a reference to the Controller (so it can achieve functionality)

How can I get this to happen without circular references?

I could obviously have the view, ViewModel and Controller all in the same project - but really would prefer not to.

I could do without the Controller and have my ViewModels handle all that stuff directly - but I want to treat my ViewModels as, well, View Models.

Thanks in advance for any advice.
___________________________________________
.\\axxx
(That's an 'M')

AnswerRe: Not specifically MVVM Question - separation by project Pin
Abhinav S12-Nov-10 1:48
Abhinav S12-Nov-10 1:48 
GeneralRe: Not specifically MVVM Question - separation by project Pin
_Maxxx_12-Nov-10 3:22
professional_Maxxx_12-Nov-10 3:22 
AnswerRe: Not specifically MVVM Question - separation by project Pin
Pete O'Hanlon12-Nov-10 2:00
mvePete O'Hanlon12-Nov-10 2:00 
GeneralRe: Not specifically MVVM Question - separation by project Pin
_Maxxx_12-Nov-10 3:17
professional_Maxxx_12-Nov-10 3:17 
GeneralRe: Not specifically MVVM Question - separation by project Pin
Pete O'Hanlon12-Nov-10 3:47
mvePete O'Hanlon12-Nov-10 3:47 
QuestionDraw shapes in Canvas control Pin
Anurag Gandhi11-Nov-10 0:39
professionalAnurag Gandhi11-Nov-10 0:39 
AnswerRe: Draw shapes in Canvas control Pin
Pete O'Hanlon11-Nov-10 1:16
mvePete O'Hanlon11-Nov-10 1:16 
Questionis there and development studio for silverlight reporting services Pin
vinu.111110-Nov-10 20:23
vinu.111110-Nov-10 20:23 
AnswerRe: is there and development studio for silverlight reporting services Pin
Mycroft Holmes10-Nov-10 20:38
professionalMycroft Holmes10-Nov-10 20:38 
GeneralRe: is there and development studio for silverlight reporting services Pin
vinu.111110-Nov-10 20:41
vinu.111110-Nov-10 20:41 
GeneralRe: is there and development studio for silverlight reporting services Pin
Mycroft Holmes10-Nov-10 20:52
professionalMycroft Holmes10-Nov-10 20:52 
GeneralRe: is there and development studio for silverlight reporting services Pin
vinu.111110-Nov-10 20:55
vinu.111110-Nov-10 20:55 
GeneralRe: is there and development studio for silverlight reporting services Pin
Mycroft Holmes10-Nov-10 21:01
professionalMycroft Holmes10-Nov-10 21:01 
GeneralRe: is there and development studio for silverlight reporting services Pin
vinu.111110-Nov-10 21:04
vinu.111110-Nov-10 21:04 
GeneralRe: is there and development studio for silverlight reporting services Pin
Mycroft Holmes10-Nov-10 21:18
professionalMycroft Holmes10-Nov-10 21:18 
GeneralRe: is there and development studio for silverlight reporting services Pin
vinu.111110-Nov-10 21:30
vinu.111110-Nov-10 21:30 
AnswerRe: is there and development studio for silverlight reporting services Pin
Abhinav S10-Nov-10 22:05
Abhinav S10-Nov-10 22:05 

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.