Open.Core.Common.DataContextObserver.DataContextObserver C# (CSharp) Méthode

DataContextObserver() public méthode

public DataContextObserver ( FrameworkElement source, System.Action onDataContextChanged ) : System
source System.Windows.FrameworkElement
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