private void UpdatePropertiesPane() { if (DocumentPanes.Any() == false) { ClearCustomPropertiesPane(); return; } var documentPane = DocumentPanes[SelectedDocumentPaneIndex]; if (_customDocumentPaneProperties.ContainsKey(documentPane) == false || _customDocumentPaneProperties[documentPane] == null) { CustomPropertyPane.Content = null; PropertyPanes.Remove(CustomPropertyPane); return; } CustomPropertyPane.Content = _customDocumentPaneProperties[documentPane]; if (PropertyPanes.Contains(CustomPropertyPane) == false) { PropertyPanes.Add(CustomPropertyPane); } FocusPropertyPane(CustomPropertyPane); }
private void ClearCustomPropertiesPane() { CustomPropertyPane.Content = null; PropertyPanes.Remove(CustomPropertyPane); if (PropertyPanes.Any()) { SelectedPropertyPaneIndex = 0; } }
private void RemovePropertyPaneByKey(string paneKey) { if (_customPropertyPanes.ContainsKey(paneKey) == false) { return; } var pane = _customPropertyPanes[paneKey]; _customPropertyPanes.Remove(paneKey); PropertyPanes.Remove(pane); }