BellaCode.Mvvm.ViewModelScope.UpdateModel C# (CSharp) Méthode

UpdateModel() private méthode

private UpdateModel ( ) : void
Résultat void
        private void UpdateModel()
        {
            if (this._viewModel != null)
            {
                // I handle a special case where the DataContext becomes {DisconnectedItem}
                // http://social.msdn.microsoft.com/Forums/en/wpf/thread/e6643abc-4457-44aa-a3ee-dd389c88bd86
                // https://connect.microsoft.com/VisualStudio/feedback/details/619658/wpf-virtualized-control-disconnecteditem-reference-when-datacontext-switch
                if (this.DataContext != null && this.DataContext.GetType().FullName == "MS.Internal.NamedObject")
                {
                    this._viewModel.Model = null;
                }
                else
                {
                    this._viewModel.Model = this.DataContext;
                }
            }
        }