Click here to Skip to main content
15,918,109 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: how to set a background color change in tree node using mousemove event at run time. Pin
Ch.Gayatri Subudhi13-Jul-10 0:20
Ch.Gayatri Subudhi13-Jul-10 0:20 
QuestionBinding RelativeSource Pin
Jammer12-Jul-10 5:34
Jammer12-Jul-10 5:34 
AnswerRe: Binding RelativeSource Pin
Pete O'Hanlon12-Jul-10 6:39
mvePete O'Hanlon12-Jul-10 6:39 
GeneralRe: Binding RelativeSource Pin
Jammer12-Jul-10 22:17
Jammer12-Jul-10 22:17 
GeneralRe: Binding RelativeSource Pin
Pete O'Hanlon13-Jul-10 2:30
mvePete O'Hanlon13-Jul-10 2:30 
GeneralRe: Binding RelativeSource Pin
Jammer13-Jul-10 5:46
Jammer13-Jul-10 5:46 
QuestionHow to access view in view model Pin
Joe Rozario12-Jul-10 0:37
Joe Rozario12-Jul-10 0:37 
AnswerRe: How to access view in view model Pin
Pete O'Hanlon12-Jul-10 1:26
mvePete O'Hanlon12-Jul-10 1:26 
Joe - it's generally considered to be a bad idea to put knowledge about a view into the viewmodel. This can cause you problems when it comes to testing your VM code because you now have an implicit link to a UI object in place. Saying that, this is a guideline not a hard and fast rule - if you can't get an alternative approach to work and you end up contorting yourself through all sorts of hoops then just do what you need to do.

However, one approach that I like is to use typed DataTemplates and let the binding engine take care of creating the relevant objects for me. Josh Smith explains it brilliantly in his MSDN article here[^]. Take a look at the section "Applying a View to a ViewModel" to get an understanding of how it all works.

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



AnswerRe: How to access view in view model Pin
Member 341039816-Jul-10 15:30
Member 341039816-Jul-10 15:30 
Questionsilverlight4 tools for visual studio 2010 fails with the following error… HELP! Pin
Tiju John11-Jul-10 22:35
Tiju John11-Jul-10 22:35 
AnswerRe: silverlight4 tools for visual studio 2010 fails with the following error… HELP! Pin
Abhinav S11-Jul-10 23:37
Abhinav S11-Jul-10 23:37 
AnswerRe: silverlight4 tools for visual studio 2010 fails with the following error… HELP! Pin
Kunal Chowdhury «IN»12-Jul-10 8:17
professionalKunal Chowdhury «IN»12-Jul-10 8:17 
GeneralRe: silverlight4 tools for visual studio 2010 fails with the following error… HELP! Pin
Tiju John12-Jul-10 18:55
Tiju John12-Jul-10 18:55 
AnswerRe: silverlight4 tools for visual studio 2010 fails with the following error… HELP! Pin
Kunal Chowdhury «IN»12-Jul-10 19:36
professionalKunal Chowdhury «IN»12-Jul-10 19:36 
GeneralRe: silverlight4 tools for visual studio 2010 fails with the following error… HELP! Pin
Tiju John16-Jul-10 5:36
Tiju John16-Jul-10 5:36 
QuestionWant to learn Silverlight from scratch in ASP.Net Pin
Amit Spadez11-Jul-10 21:38
professionalAmit Spadez11-Jul-10 21:38 
AnswerRe: Want to learn Silverlight from scratch in ASP.Net Pin
Abhinav S11-Jul-10 22:06
Abhinav S11-Jul-10 22:06 
GeneralRe: Want to learn Silverlight from scratch in ASP.Net Pin
Amit Spadez11-Jul-10 22:13
professionalAmit Spadez11-Jul-10 22:13 
AnswerRe: Want to learn Silverlight from scratch in ASP.Net Pin
Abhinav S11-Jul-10 23:08
Abhinav S11-Jul-10 23:08 
AnswerRe: Want to learn Silverlight from scratch in ASP.Net Pin
Kunal Chowdhury «IN»12-Jul-10 17:23
professionalKunal Chowdhury «IN»12-Jul-10 17:23 
QuestionComboBox Items (Binding?) Pin
seblake11-Jul-10 13:31
seblake11-Jul-10 13:31 
AnswerRe: ComboBox Items (Binding?) Pin
Jammer11-Jul-10 22:43
Jammer11-Jul-10 22:43 
GeneralRe: ComboBox Items (Binding?) Pin
seblake13-Jul-10 16:58
seblake13-Jul-10 16:58 
GeneralRe: ComboBox Items (Binding?) Pin
Jammer14-Jul-10 1:36
Jammer14-Jul-10 1:36 
GeneralRe: ComboBox Items (Binding?) Pin
seblake14-Jul-10 8:03
seblake14-Jul-10 8:03 

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.