Click here to Skip to main content
15,885,771 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: XML Treeview NodeChanged event not triggering on attribute edit Pin
wilx2-Feb-14 23:09
wilx2-Feb-14 23:09 
QuestionAnother real newbie question - wiring events to handlers not in the code-behind class Pin
Marc Clifton2-Feb-14 10:57
mvaMarc Clifton2-Feb-14 10:57 
AnswerRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Pete O'Hanlon2-Feb-14 11:27
mvePete O'Hanlon2-Feb-14 11:27 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Marc Clifton5-Feb-14 15:09
mvaMarc Clifton5-Feb-14 15:09 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Pete O'Hanlon5-Feb-14 23:15
mvePete O'Hanlon5-Feb-14 23:15 
AnswerRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
_Maxxx_2-Feb-14 19:19
professional_Maxxx_2-Feb-14 19:19 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Mycroft Holmes3-Feb-14 3:05
professionalMycroft Holmes3-Feb-14 3:05 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
_Maxxx_3-Feb-14 9:29
professional_Maxxx_3-Feb-14 9:29 
No I don't, no I"m not.

What is this 'purist' approach of which you speak?

My understanding of the pattern is that the GUI stuff is separated from the ViewModel stuff. MVVM != WPF and in WPF both CAML and .cs code behind are used together to build a class. It is that class's responsibility to provide the UI to implement the ViewModel, as it were.

Nowhere in the MVVM pattern does it prescribe anything to do with code behind.

So some folk have taken it upon themselves to say 'thou shalt not have code behind' because (I think) if they don't , some careless programmers will start putting business logic in the code behind - which is bad, not because it is in the code behind but because it is in the UI class which should not be implementing business logic.

But I don't understand why people feel the need to write additional Xaml functionality - often quite complex and usually a variation on some theme functionality - to avoid using two or three lines of code in the code behind.

I believe it is wrong, as having UI functionality in C# in code behind is often more 'obvious' to the maintenance programmer, and frequently less complex.
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011

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

GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Marc Clifton5-Feb-14 15:13
mvaMarc Clifton5-Feb-14 15:13 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
_Maxxx_5-Feb-14 15:26
professional_Maxxx_5-Feb-14 15:26 
QuestionHow do I wire Command to functions not in the view? Pin
Marc Clifton2-Feb-14 10:14
mvaMarc Clifton2-Feb-14 10:14 
QuestionHow to bind a dataset to a WPF richtextbox? Pin
fsunole0329-Jan-14 10:43
fsunole0329-Jan-14 10:43 
AnswerRe: How to bind a dataset to a WPF richtextbox? Pin
Wayne Gaylard30-Jan-14 1:07
professionalWayne Gaylard30-Jan-14 1:07 
QuestionHandling RowEditEnding in a DataGrid according to MVVM pattern Pin
Piotr Z27-Jan-14 23:43
Piotr Z27-Jan-14 23:43 
AnswerRe: Handling RowEditEnding in a DataGrid according to MVVM pattern Pin
Pete O'Hanlon28-Jan-14 0:29
mvePete O'Hanlon28-Jan-14 0:29 
GeneralRe: Handling RowEditEnding in a DataGrid according to MVVM pattern Pin
Piotr Z28-Jan-14 0:51
Piotr Z28-Jan-14 0:51 
GeneralRe: Handling RowEditEnding in a DataGrid according to MVVM pattern Pin
Pete O'Hanlon28-Jan-14 1:10
mvePete O'Hanlon28-Jan-14 1:10 
AnswerRe: Handling RowEditEnding in a DataGrid according to MVVM pattern Pin
_Maxxx_2-Feb-14 19:36
professional_Maxxx_2-Feb-14 19:36 
QuestionProblems updating datagrid from collection Pin
abollmeyer23-Jan-14 10:55
abollmeyer23-Jan-14 10:55 
AnswerRe: Problems updating datagrid from collection Pin
Mycroft Holmes23-Jan-14 12:04
professionalMycroft Holmes23-Jan-14 12:04 
QuestionBinding property from XML file data Pin
abollmeyer21-Jan-14 9:18
abollmeyer21-Jan-14 9:18 
AnswerRe: Binding property from XML file data Pin
abollmeyer21-Jan-14 14:44
abollmeyer21-Jan-14 14:44 
QuestionCombobox / Textblock field Pin
eddieangel21-Jan-14 6:24
eddieangel21-Jan-14 6:24 
AnswerRe: Combobox / Textblock field Pin
Jason Gleim21-Jan-14 7:52
professionalJason Gleim21-Jan-14 7:52 
GeneralRe: Combobox / Textblock field Pin
eddieangel21-Jan-14 8:07
eddieangel21-Jan-14 8:07 

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.