Click here to Skip to main content
15,902,299 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois1-Aug-12 13:32
professionalKevin Marois1-Aug-12 13:32 
GeneralRe: WPF Update UI When Collection Changes Pin
Mycroft Holmes1-Aug-12 14:17
professionalMycroft Holmes1-Aug-12 14:17 
GeneralRe: WPF Update UI When Collection Changes Pin
SledgeHammer011-Aug-12 15:49
SledgeHammer011-Aug-12 15:49 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois1-Aug-12 17:33
professionalKevin Marois1-Aug-12 17:33 
GeneralRe: WPF Update UI When Collection Changes Pin
SledgeHammer011-Aug-12 17:46
SledgeHammer011-Aug-12 17:46 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 13:39
professionalKevin Marois2-Aug-12 13:39 
GeneralRe: WPF Update UI When Collection Changes Pin
SledgeHammer012-Aug-12 14:08
SledgeHammer012-Aug-12 14:08 
GeneralRe: WPF Update UI When Collection Changes Pin
Pete O'Hanlon1-Aug-12 22:13
mvePete O'Hanlon1-Aug-12 22:13 
Alternatively, if you don't want to pollute this model, remember that the full pattern is called MVVM. The thing is, you are binding directly to your model here and that's not always the done thing. What I would do, if I were you, would be introduce a ViewModel that encapsulates the part of the AddressEntity that you are interested in.

There are a few reasons that I would do this, but one of the most basic ones is that your caption is unconstrained by the model. Now suppose that you want to guarantee that the user cannot submit a blank caption, then you simply put validation on your VM. As I don't know what your validation requirements are here, I would advise you to read up on validating data entries in MVVM.

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 6:31
professionalKevin Marois2-Aug-12 6:31 
GeneralRe: WPF Update UI When Collection Changes Pin
Gerry Schmitz2-Aug-12 8:40
mveGerry Schmitz2-Aug-12 8:40 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 8:47
professionalKevin Marois2-Aug-12 8:47 
GeneralRe: WPF Update UI When Collection Changes Pin
Gerry Schmitz2-Aug-12 9:05
mveGerry Schmitz2-Aug-12 9:05 
GeneralRe: WPF Update UI When Collection Changes Pin
Ed Hill _5_2-Aug-12 23:02
Ed Hill _5_2-Aug-12 23:02 
GeneralRe: WPF Update UI When Collection Changes Pin
Pete O'Hanlon2-Aug-12 9:47
mvePete O'Hanlon2-Aug-12 9:47 
GeneralRe: WPF Update UI When Collection Changes Pin
Gerry Schmitz2-Aug-12 9:55
mveGerry Schmitz2-Aug-12 9:55 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 9:57
professionalKevin Marois2-Aug-12 9:57 
GeneralRe: WPF Update UI When Collection Changes Pin
Pete O'Hanlon2-Aug-12 10:21
mvePete O'Hanlon2-Aug-12 10:21 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 10:25
professionalKevin Marois2-Aug-12 10:25 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 10:02
professionalKevin Marois2-Aug-12 10:02 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 9:56
professionalKevin Marois2-Aug-12 9:56 
GeneralRe: WPF Update UI When Collection Changes Pin
Gerry Schmitz2-Aug-12 10:33
mveGerry Schmitz2-Aug-12 10:33 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 10:43
professionalKevin Marois2-Aug-12 10:43 
GeneralRe: WPF Update UI When Collection Changes Pin
SledgeHammer012-Aug-12 12:58
SledgeHammer012-Aug-12 12:58 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 13:01
professionalKevin Marois2-Aug-12 13:01 
GeneralRe: WPF Update UI When Collection Changes Pin
SledgeHammer012-Aug-12 13:20
SledgeHammer012-Aug-12 13:20 

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.