private void Host_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName != "CurrentPresenter") return; if (_config.Host.CurrentPresenter == _previousPresenter) return; _previousPresenter = _config.Host.CurrentPresenter; if (_previousPresenter == null) _stateManager.Remove(_config.HistoryKey); else { _stateManager.InsertOrUpdate(_config.HistoryKey, _previousPresenter.GetHistoryValue()); _stateManager.CommitChanges(_previousPresenter.DisplayName); UpdateTitle(_previousPresenter); } }