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.OnPropertyInvalidated() == DependencyObject.OnPropertyChanged()?

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


 
 

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 SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
Tina Tam [MSFT]


 
 

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 SpecsSystem Spec
Old 01-10-2006   #3 (permalink)
Jason Dolinger


 
 

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 SpecsSystem Spec
Old 01-10-2006   #4 (permalink)
Tina Tam [MSFT]


 
 

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 SpecsSystem Spec
Old 01-10-2006   #5 (permalink)
Jason Dolinger


 
 

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 SpecsSystem Spec
 

Thread Tools



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