Click here to Skip to main content
15,917,641 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Send content of button from View to ViewModel Pin
Abhinav S26-Oct-13 1:21
Abhinav S26-Oct-13 1:21 
GeneralRe: Send content of button from View to ViewModel Pin
Ashfaque Hussain7-Nov-13 23:06
Ashfaque Hussain7-Nov-13 23:06 
QuestionNo suitable axis is available for plotting the dependent value Pin
SunnyGaur21-Oct-13 17:10
SunnyGaur21-Oct-13 17:10 
QuestionRe: No suitable axis is available for plotting the dependent value Pin
Kenneth Haugland23-Oct-13 6:20
mvaKenneth Haugland23-Oct-13 6:20 
AnswerRe: No suitable axis is available for plotting the dependent value Pin
SunnyGaur23-Oct-13 17:07
SunnyGaur23-Oct-13 17:07 
Questionany chance to get expression gallery website content Pin
amigoface19-Oct-13 6:19
amigoface19-Oct-13 6:19 
AnswerRe: any chance to get expression gallery website content Pin
Richard Deeming21-Oct-13 3:15
mveRichard Deeming21-Oct-13 3:15 
QuestionSetting the value of TimePicker resets the DatePicker value, how can i solve thi Pin
rizwanahmed2417-Oct-13 11:28
rizwanahmed2417-Oct-13 11:28 
AnswerRe: Setting the value of TimePicker resets the DatePicker value, how can i solve thi Pin
Matt T Heffron17-Oct-13 15:03
professionalMatt T Heffron17-Oct-13 15:03 
GeneralRe: Setting the value of TimePicker resets the DatePicker value, how can i solve thi Pin
rizwanahmed2419-Oct-13 10:13
rizwanahmed2419-Oct-13 10:13 
QuestionWPF View Data Template Questions Pin
Kevin Marois17-Oct-13 9:41
professionalKevin Marois17-Oct-13 9:41 
AnswerRe: WPF View Data Template Questions Pin
SledgeHammer0117-Oct-13 17:00
SledgeHammer0117-Oct-13 17:00 
GeneralRe: WPF View Data Template Questions Pin
Pete O'Hanlon17-Oct-13 21:40
mvePete O'Hanlon17-Oct-13 21:40 
GeneralRe: WPF View Data Template Questions Pin
_Maxxx_21-Oct-13 19:49
professional_Maxxx_21-Oct-13 19:49 
GeneralRe: WPF View Data Template Questions Pin
SledgeHammer0122-Oct-13 7:27
SledgeHammer0122-Oct-13 7:27 
GeneralRe: WPF View Data Template Questions Pin
Mycroft Holmes22-Oct-13 12:49
professionalMycroft Holmes22-Oct-13 12:49 
GeneralRe: WPF View Data Template Questions Pin
_Maxxx_22-Oct-13 13:08
professional_Maxxx_22-Oct-13 13:08 
GeneralRe: WPF View Data Template Questions Pin
Mycroft Holmes22-Oct-13 14:13
professionalMycroft Holmes22-Oct-13 14:13 
GeneralRe: WPF View Data Template Questions Pin
SledgeHammer0122-Oct-13 14:46
SledgeHammer0122-Oct-13 14:46 
GeneralRe: WPF View Data Template Questions Pin
SledgeHammer0122-Oct-13 14:40
SledgeHammer0122-Oct-13 14:40 
GeneralRe: WPF View Data Template Questions Pin
_Maxxx_22-Oct-13 13:03
professional_Maxxx_22-Oct-13 13:03 
SledgeHammer01 wrote:
The VM knows it needs to show a dialog or window or slide something into view via an animation, or whatever.

That's where I differ. The VM (in my world) only knows that another VM needs to execute - everything works (in principal) even if there is no view - the VM has no right to know that a view is to be shown modally, slid in or animated - that's the View's responsibility.

I keep ALL GUI stuff out of the Views


SledgeHammer01 wrote:
Doing it the way you suggested means VM A knows about VM B and intimately knows VM B wants View B attached to it, the DataContext set, etc.



Actually I use a controller to communicate between View Models - so generally one VM doesn't know about another.
e.g.

User clicks button on View1 to edit selected customer.
Command "Edit Custeomr" on VM1 executes - it knows which is the selected customer by binding.
VM1 sends message "Customer Selected For Edit"
Controller is subscribed to message - receives it, sources the relevant VM (the 'edit customer' VM) (and possibly checks to see if there already is one editing that customer) and instantiates it (and its associated View.


SledgeHammer01 wrote:
Going the way I suggested is more consistent with how the web works. I don't do web stuff, so its kind of ironic... but on the web, you redirect to the .html (the "view"), not the .cs (the "view model").


The way the web works isn't necessarily a 'good' way, though Smile | :)

And on the web, the View is the HTML and the VM is more accurately Javascript - the .cs the controller/model

It is interesting that there are so many different ways to implement similar patterns.
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011

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

AnswerRe: WPF View Data Template Questions Pin
Gabriel Szabo17-Oct-13 23:03
Gabriel Szabo17-Oct-13 23:03 
GeneralRe: WPF View Data Template Questions Pin
SledgeHammer0118-Oct-13 4:54
SledgeHammer0118-Oct-13 4:54 
GeneralRe: WPF View Data Template Questions Pin
Gabriel Szabo21-Oct-13 22:35
Gabriel Szabo21-Oct-13 22:35 
GeneralRe: WPF View Data Template Questions Pin
SledgeHammer0122-Oct-13 5:21
SledgeHammer0122-Oct-13 5:21 

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.