![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Building a PC | Gaming | |||
| Building your own Rig | General Discussion | |||
| Building a PC | General Discussion | |||