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

WPF

 
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 
_Maxxx_ wrote:
ViewModel now knows that, as a result of that command, the ShowCustomerViewModel
needs to be shown
Whether through DI, hard coding, via a Controller or magic,
the VM instntiates a ShowCustomerViewModel and tells it it needs to 'do its
stuff'


That makes no sense to me lol. VMs are not shown, Views are.


_Maxxx_ wrote:
If I understand you above post correctly, you are saying that the click on teh
View is telling the View to show the CustomerDetailView - but isn't it better to
keep views entirely separate from one another, as the VM is a model - the View
is just the eye candy?


Slight misread. The view doesn't do anything. It doesn't have any code behind. In fact, I always delete the .cs code behind file just so some douche won't come around and stick stuff in there Smile | :) . Clicking on a button in the view executes a command in the VM. The VM knows it needs to show a dialog or window or slide something into view via an animation, or whatever. 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.

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").
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 
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 
QuestionBinding to a collection in code behind Pin
Alessandro Ranieri17-Oct-13 3:24
Alessandro Ranieri17-Oct-13 3:24 
AnswerRe: Binding to a collection in code behind Pin
Matt T Heffron17-Oct-13 7:43
professionalMatt T Heffron17-Oct-13 7:43 
AnswerRe: Binding to a collection in code behind Pin
SledgeHammer0117-Oct-13 9:17
SledgeHammer0117-Oct-13 9:17 
AnswerRe: Binding to a collection in code behind Pin
Abhinav S17-Oct-13 17:12
Abhinav S17-Oct-13 17:12 
QuestionMouse up/down events Pin
columbos1492716-Oct-13 19:52
columbos1492716-Oct-13 19:52 
AnswerRe: Mouse up/down events Pin
Richard Deeming17-Oct-13 0:42
mveRichard Deeming17-Oct-13 0:42 
AnswerRe: Mouse up/down events Pin
Ashfaque Hussain25-Oct-13 1:08
Ashfaque Hussain25-Oct-13 1:08 

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.