Click here to Skip to main content
15,886,788 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Duke Carey27-May-11 0:42
professionalDuke Carey27-May-11 0:42 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Pete O'Hanlon27-May-11 2:01
mvePete O'Hanlon27-May-11 2:01 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Mycroft Holmes27-May-11 13:54
professionalMycroft Holmes27-May-11 13:54 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Duke Carey31-May-11 0:37
professionalDuke Carey31-May-11 0:37 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Mycroft Holmes31-May-11 13:10
professionalMycroft Holmes31-May-11 13:10 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
_Maxxx_31-May-11 13:32
professional_Maxxx_31-May-11 13:32 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Pete O'Hanlon31-May-11 21:37
mvePete O'Hanlon31-May-11 21:37 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
_Maxxx_29-May-11 15:35
professional_Maxxx_29-May-11 15:35 
Pete O'Hanlon wrote:
the parent ViewModel has to know what views are associated with it, and hence the ViewModels that are associated with those views. This is a real no-no.


I don't understand why you say this?

Lets say I will have a page showing a list of customers, and also the individual fields from the currently selected customer.

In MVVM I would create a VM for the page, and also (because the functionality is self-contained) a VM for the list of customers and a VM for the individual Customer fields (that is, ONE VM with properties for each Customer field)

Now, my Page VM is nonsense without having a CustomerListVM and a CustomerEditVM somehow contained within it.

It certainly doesn't know about the VIEWs but it MUST know about the ViewModels

Similarly neither the customerListVM nor the CustomerEditVM can know about the PageVM - they need to exist independently.

so surely my PageVM legitimately can say "I want to display this list of customers" - and give the list to the CustomerListVM?
MVVM# - See how I did MVVM my way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011

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

GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Pete O'Hanlon30-May-11 23:05
mvePete O'Hanlon30-May-11 23:05 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
_Maxxx_31-May-11 13:16
professional_Maxxx_31-May-11 13:16 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Pete O'Hanlon31-May-11 21:37
mvePete O'Hanlon31-May-11 21:37 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Mycroft Holmes31-May-11 13:14
professionalMycroft Holmes31-May-11 13:14 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
_Maxxx_31-May-11 13:27
professional_Maxxx_31-May-11 13:27 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Mycroft Holmes31-May-11 14:30
professionalMycroft Holmes31-May-11 14:30 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
_Maxxx_31-May-11 15:59
professional_Maxxx_31-May-11 15:59 
QuestionHow to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Vimalsoft(Pty) Ltd26-May-11 0:18
professionalVimalsoft(Pty) Ltd26-May-11 0:18 
QuestionRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Mark Salsbery26-May-11 11:10
Mark Salsbery26-May-11 11:10 
AnswerRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Vimalsoft(Pty) Ltd26-May-11 11:13
professionalVimalsoft(Pty) Ltd26-May-11 11:13 
GeneralRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Mark Salsbery26-May-11 11:39
Mark Salsbery26-May-11 11:39 
GeneralRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Vimalsoft(Pty) Ltd26-May-11 19:04
professionalVimalsoft(Pty) Ltd26-May-11 19:04 
GeneralRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Mark Salsbery26-May-11 19:09
Mark Salsbery26-May-11 19:09 
QuestionHow to retrieve hyperlink url from selection text in wpf? Pin
John-ph25-May-11 23:06
John-ph25-May-11 23:06 
QuestionInstaller for WPF Control Pin
Prasoon Chaudhary25-May-11 21:22
Prasoon Chaudhary25-May-11 21:22 
AnswerRe: Installer for WPF Control Pin
Wayne Gaylard25-May-11 21:32
professionalWayne Gaylard25-May-11 21:32 
QuestionRe: Installer for WPF Control Pin
Prasoon Chaudhary25-May-11 22:09
Prasoon Chaudhary25-May-11 22:09 

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.