Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - DependencyObject.GetValue() and GetValueBase() - Building customcontrols.

 
 
Old 01-10-2006   #1 (permalink)
Jason Dolinger


 
 

DependencyObject.GetValue() and GetValueBase() - Building customcontrols.

Does anyone know if the method DependencyObject.GetValueBase() has been
removed? I can't find it anywhere in the MSDN documentation for this
class. What are we supposed to replace it with?

In any of the code I've seen that is building custom controls, they
sometimes use GetValue() and GetValueBase() without really specifying
what the difference was between the two. Now without any documentation,
I can't even learn the difference for myself!

Thanks guys, any comments would be appreciated.

Jason

My System SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
Wolf Schmidt [MSFT]


 
 

RE: DependencyObject.GetValue() and GetValueBase() - Building custom c

The split between GetValue and GetValueBase are leftovers from the older
property system design where implementers of a DP were supposed to do their
own property value caching algorithm.

Under the old system, GetValue might return the cached value, but
GetValueBase would be sure to always call into the DP around the caching, and
was used to get values from within the get{} CLR property implementation that
performed caching.

However the current property system design has dropped the DP-owner-centric
caching, and instead the property system itself does a better job of
returning effective values. Also, on the Set side, only raises *Changed
events if the effective value really did change.

For your purposes, whatever might have used to call GetValueBase can just
call GetValue and obtain the same result.

If you want to look at some dirty laundry and see how this used to be you
can still look at the "windowssdk" version of the docs online, which is
frozen for now at the Beta1 version. e.g.:
http://windowssdk.msdn.microsoft.com...1_0bab04f6.asp
[note that it's possible that site may refresh to be more modern at any time]

"Jason Dolinger" wrote:

> Does anyone know if the method DependencyObject.GetValueBase() has been
> removed? I can't find it anywhere in the MSDN documentation for this
> class. What are we supposed to replace it with?
>
> In any of the code I've seen that is building custom controls, they
> sometimes use GetValue() and GetValueBase() without really specifying
> what the difference was between the two. Now without any documentation,
> I can't even learn the difference for myself!
>
> Thanks guys, any comments would be appreciated.
>
> Jason
>

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Building a PC Gaming
Building your own Rig General Discussion
Building a PC General Discussion


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46