BellaCode.Mvvm.ViewModelScope.OnChildChanged C# (CSharp) Метод

OnChildChanged() приватный Метод

private OnChildChanged ( UIElement oldValue, UIElement newValue ) : void
oldValue UIElement
newValue UIElement
Результат void
        private void OnChildChanged(UIElement oldValue, UIElement newValue)
        {
            FrameworkElement oldChildElement = oldValue as FrameworkElement;
            if (oldChildElement != null)
            {
                oldChildElement.DataContext = null;
            }

            this.AttachViewModel();
        }