![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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 |
| | #2 (permalink) |
| Guest | 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 |
| | #3 (permalink) |
| Guest | Re: DependencyObject.OnPropertyInvalidated() == DependencyObject.OnPropertyChanged()? 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 |
| | #4 (permalink) |
| Guest | 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 |
| | #5 (permalink) |
| Guest | 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 |
| | #6 (permalink) |
| Guest | 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 > > > |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What's the best way to notify the binding manager that a DependencyObject property have changed | Pon | Avalon | 9 | 11-29-2006 03:34 AM |
| Dependency property not initialized in OnPropertyChanged? | Jared Bienz | Avalon | 0 | 01-10-2006 03:53 PM |
| DependencyObject.GetValue() and GetValueBase() - Building customcontrols. | Jason Dolinger | Avalon | 1 | 01-10-2006 03:52 PM |