What event is generated when ContentControl.Content is installed?

I need to subscribe to an event for a control when ContentControl.Content set.

Please, what event can I put in my code to set it?

I tried using SourceUpdated and DataContextChanged , but it does not work.

+4
source share
1 answer

From this web page :

A strange approach to receiving notifications of changes in dependency properties includes the dynamic creation of both dependency properties and data bindings. If you are writing a class that descends from DependencyObject, you have access to an object that contains dependency properties, and you must notify it when one of these dependency properties changes, you can create the dependency property and the binding on the fly to give you the information you need .

ContentControl.Content is a dependency property.

+1
source

Source: https://habr.com/ru/post/1499268/


All Articles