BellaCode.Mvvm.ViewModelScope.DetachViewModel C# (CSharp) Method

DetachViewModel() private method

private DetachViewModel ( ) : void
return void
        private void DetachViewModel()
        {
            FrameworkElement childElement = this.Child as FrameworkElement;
            if (childElement != null)
            {
                childElement.DataContext = null;
            }

            if (this._viewModel != null)
            {
                this._viewModel.View = null;
                this._viewModel.Model = null;
            }
        }