public DataContextObserver ( |
||
source | ||
onDataContextChanged | System.Action | |
Résultat | System |
public DataContextObserver(FrameworkElement source, Action onDataContextChanged)
{
// Setup initial conditions.
Source = source;
OnDataContextChangedAction = onDataContextChanged;
// Create the dependency-property.
RegisterProperty();
// Store this instance in the static list (so it can be retrieved from the static event handler).
instances.Add(new WeakReference(this));
}
#endregion