Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

DependencyObject.OnPropertyInvalidated() == DependencyObject.OnPropertyChanged()?

Closed Thread
 
Thread Tools Display Modes
Old 01-10-2006   #1 (permalink)
Jason Dolinger
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
Old 01-10-2006   #2 (permalink)
Tina Tam [MSFT]
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



Old 01-10-2006   #3 (permalink)
Jason Dolinger
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
Old 01-10-2006   #4 (permalink)
Jason Dolinger
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
Old 01-10-2006   #5 (permalink)
Tina Tam [MSFT]
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



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

>
>
>

Closed Thread

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








Vistax64.com 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 2005-2008

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 47 48 49 50