private void UpdateView() { if (_currentExplorerInfo != null && _currentExplorerInfo._explorerFrame != null) { RemoveFrameEvents(); } if (_editingContext == null) { // We set the explorer frame to be null so that we can reset it // whenever a model is brought into focus (see 'Setting Explorer Info:' below) if (_currentExplorerInfo != null) { _currentExplorerInfo._explorerFrame = null; } _currentExplorerInfo = null; _elementHost.Child = null; } else { _currentExplorerInfo = _editingContext.Items.GetValue <ExplorerInfo>(); Debug.Assert(_currentExplorerInfo != null, "Couldn't get ExplorerInfo form context"); if (_currentExplorerInfo != null) { // Setting Explorer Info: If the explorer frame is null, then reset the explorer info from the // editing context. if (_currentExplorerInfo._explorerFrame == null) { SetExplorerInfo(); } AddFrameEvents(); try { _elementHost.Child = _currentExplorerInfo._explorerFrame; } catch (Exception e) { Debug.Fail(e.ToString()); } } } }
private void UpdateView() { if (_currentExplorerInfo != null && _currentExplorerInfo._explorerFrame != null) { RemoveFrameEvents(); } if (_editingContext == null) { // We set the explorer frame to be null so that we can reset it // whenever a model is brought into focus (see 'Setting Explorer Info:' below) if (_currentExplorerInfo != null) { _currentExplorerInfo._explorerFrame = null; } _currentExplorerInfo = null; _elementHost.Child = null; } else { _currentExplorerInfo = _editingContext.Items.GetValue<ExplorerInfo>(); Debug.Assert(_currentExplorerInfo != null, "Couldn't get ExplorerInfo form context"); if (_currentExplorerInfo != null) { // Setting Explorer Info: If the explorer frame is null, then reset the explorer info from the // editing context. if (_currentExplorerInfo._explorerFrame == null) { SetExplorerInfo(); } AddFrameEvents(); try { _elementHost.Child = _currentExplorerInfo._explorerFrame; } catch (Exception e) { Debug.Fail(e.ToString()); } } } }