Click here to Skip to main content
15,900,616 members
Home / Discussions / WPF
   

WPF

 
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 
Yes, it is definitely simpler. If you are looking for a quick & dirty solution, this is it. I was just pointing out that it could slow down your UI CONSIDERABLY depending on how its set up.

Think about what happens. You raise an INPC for "SomeProp". Some UI element is listening to the INPCs. It has to listen for a specific one for "SomeProp". Say your POCO has 20 properties. You just raised an INPC 20 times and that check for "SomeProp" also happens 20 times (at least). Not a super expensive situation, but just one of many.

A more expensive situation may be where you have 5 bound properties. You update Prop1, but because you went the quick & dirty route, you now send 4 INPCs for stuff that hasn't even changed. Prop4 might be an expensive property to refresh, but Prop1 may be super cheap. You certainly wouldn't want to send an INPC for the expensive Prop4 in this case.

Again, depends on your situation Smile | :) . Just tossing out that your UI could slow down considerably by going this route Smile | :) .

If you used the dictionary solution I provided earlier, you wouldn't have this problem.

If you are sure all properties are cheap to update then this solution is fine Smile | :)

But you might notice your CPU% going high Smile | :) .
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois2-Aug-12 13:27
professionalKevin Marois2-Aug-12 13:27 
GeneralRe: WPF Update UI When Collection Changes Pin
SledgeHammer012-Aug-12 13:31
SledgeHammer012-Aug-12 13:31 
Questionprogressbar Pin
daniardwihartomo31-Jul-12 18:34
daniardwihartomo31-Jul-12 18:34 
AnswerRe: progressbar Pin
Mycroft Holmes31-Jul-12 19:26
professionalMycroft Holmes31-Jul-12 19:26 
AnswerRe: progressbar Pin
Christian Amado2-Aug-12 8:48
professionalChristian Amado2-Aug-12 8:48 
QuestionThemes Change Pin
rahul ameta30-Jul-12 21:39
rahul ameta30-Jul-12 21:39 
AnswerRe: Themes Change Pin
Wayne Gaylard30-Jul-12 22:03
professionalWayne Gaylard30-Jul-12 22:03 
AnswerRe: Themes Change Pin
Christian Amado2-Aug-12 8:50
professionalChristian Amado2-Aug-12 8:50 
QuestionUsercontrol Pin
rahul ameta30-Jul-12 21:33
rahul ameta30-Jul-12 21:33 
AnswerRe: Usercontrol Pin
Wayne Gaylard30-Jul-12 21:55
professionalWayne Gaylard30-Jul-12 21:55 
AnswerRe: Usercontrol Pin
Christian Amado2-Aug-12 8:58
professionalChristian Amado2-Aug-12 8:58 
GeneralWPF Command Binding Problem Pin
Kevin Marois25-Jul-12 6:35
professionalKevin Marois25-Jul-12 6:35 
GeneralRe: WPF Command Binding Problem Pin
SledgeHammer0125-Jul-12 11:56
SledgeHammer0125-Jul-12 11:56 
GeneralRe: WPF Command Binding Problem Pin
Martijn Kok25-Jul-12 12:25
Martijn Kok25-Jul-12 12:25 
GeneralRe: WPF Command Binding Problem Pin
SledgeHammer0125-Jul-12 13:44
SledgeHammer0125-Jul-12 13:44 
GeneralRe: WPF Command Binding Problem Pin
Martijn Kok25-Jul-12 19:22
Martijn Kok25-Jul-12 19:22 
GeneralRe: WPF Command Binding Problem Pin
SledgeHammer0126-Jul-12 7:35
SledgeHammer0126-Jul-12 7:35 

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.