Listening for changes to a UserControl's DataContext property
Last post 05-13-2008 11:29 PM by Allen Chen – MSFT. 1 replies.
Sort Posts:
05-12-2008 10:32 PM
Listening for changes to a UserControl's DataContext property

 I've created a UserControl that does creates some dynamic ui elements based on the DataContext.

Is it possible to add a listener to the DataContext DependancyProperty owned by the base class (in this case FrameworkElement)?

 

Thanks,

Justin
 

coughlinj

Loading...
Joined on 03-07-2008
Vancouver
Posts 55
05-13-2008 11:29 PM
Marked as Answer
Re: Listening for changes to a UserControl's DataContext property

Hi:

  We can use callback to do this. It's similar to WPF:

http://msdn.microsoft.com/en-us/library/ms745795.aspx

Regards

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Allen Chen – MSFT

Loading...
Joined on 03-16-2007
Posts 1,566
Page view counter