![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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.OnPropertyInvalidated() == DependencyObject.OnPropertyChanged()? Hi all, As may be seen in several other threads, I'm attempting to develop a custom control using WPF. I was trying to override the OnPropertyInvalidated() method of System.Windows.Controls.Control. Apparently this property does not exist anymore, but there is an OnPropertyChanged() method. Are these equivalent? Thanks, Jason |
My System Specs![]() |
| | #2 (permalink) |
| | Re: DependencyObject.OnPropertyInvalidated() == DependencyObject.OnPropertyChanged()? Hi Jason, Yes, you should override OnPropertyChanged instead. OldValue and NewValue are now part of the event args that are passed in so you can use those values instead of your cache values. Thanks, Tina "Jason Dolinger" <jdolinger@lab49.com> wrote in message news:%23a9OfWp%23FHA.3064@TK2MSFTNGP10.phx.gbl... > Hi all, > > As may be seen in several other threads, I'm attempting to develop a > custom control using WPF. I was trying to override the > OnPropertyInvalidated() method of System.Windows.Controls.Control. > Apparently this property does not exist anymore, but there is an > OnPropertyChanged() method. Are these equivalent? > > Thanks, > Jason |
My System Specs![]() |
| | #3 (permalink) |
| | Re: DependencyObject.OnPropertyInvalidated() == DependencyObject.OnPropertyChanged()? Tina Tam [MSFT] wrote: > Hi Jason, > > Yes, you should override OnPropertyChanged instead. OldValue and NewValue > are now part of the event args that are passed in so you can use those > values instead of your cache values. > > Thanks, > Tina > > "Jason Dolinger" <jdolinger@lab49.com> wrote in message > news:%23a9OfWp%23FHA.3064@TK2MSFTNGP10.phx.gbl... > >>Hi all, >> >>As may be seen in several other threads, I'm attempting to develop a >>custom control using WPF. I was trying to override the >>OnPropertyInvalidated() method of System.Windows.Controls.Control. >>Apparently this property does not exist anymore, but there is an >>OnPropertyChanged() method. Are these equivalent? >> >>Thanks, >>Jason > > > Hi Tina, as I mentioned in a different followup, OnPropertyChanged() is gone as well. Now what? Thanks! Jason |
My System Specs![]() |
| | #4 (permalink) |
| | Re: DependencyObject.OnPropertyInvalidated() == DependencyObject.OnPropertyChanged()? Hi Jason, If you're using the Nov CTP OnPropertyChanged() should be there. The method has not been removed and I have verified that it is in the Nov CTP. The OnPropertyChanged() on Control would be inherited from FrameworkElement. Thanks, Tina ----------------- This posting is provided "AS IS" with no warranties, and confers no rights. "Jason Dolinger" <jdolinger@lab49.com> wrote in message news:%23C4BuVr%23FHA.1032@TK2MSFTNGP11.phx.gbl... > Jason Dolinger wrote: >> Hi all, >> >> As may be seen in several other threads, I'm attempting to develop a >> custom control using WPF. I was trying to override the >> OnPropertyInvalidated() method of System.Windows.Controls.Control. >> Apparently this property does not exist anymore, but there is an >> OnPropertyChanged() method. Are these equivalent? >> >> Thanks, >> Jason > > Scratch that, OnPropertyChanged() is gone also... Now what? > > ![]() > Jason |
My System Specs![]() |
| | #5 (permalink) |
| | Re: DependencyObject.OnPropertyInvalidated() == DependencyObject.OnPropertyChanged()? Hey Tina, You are correct, that method does exist. I'm still learning the ins and outs of Visual Studio and I had my Object Browser set to hide protected methods... Jason Tina Tam [MSFT] wrote: > Hi Jason, > > If you're using the Nov CTP OnPropertyChanged() should be there. The method > has not been removed and I have verified that it is in the Nov CTP. The > OnPropertyChanged() on Control would be inherited from FrameworkElement. > > Thanks, > Tina > ----------------- > This posting is provided "AS IS" with no warranties, and confers no rights. > > > > "Jason Dolinger" <jdolinger@lab49.com> wrote in message > news:%23C4BuVr%23FHA.1032@TK2MSFTNGP11.phx.gbl... > >>Jason Dolinger wrote: >> >>>Hi all, >>> >>>As may be seen in several other threads, I'm attempting to develop a >>>custom control using WPF. I was trying to override the >>>OnPropertyInvalidated() method of System.Windows.Controls.Control. >>>Apparently this property does not exist anymore, but there is an >>>OnPropertyChanged() method. Are these equivalent? >>> >>>Thanks, >>>Jason >> >>Scratch that, OnPropertyChanged() is gone also... Now what? >> >> ![]() >>Jason > > > |
My System Specs![]() |