Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private void ClearCustomPropertiesPane()
        {
            CustomPropertyPane.Content = null;
            PropertyPanes.Remove(CustomPropertyPane);

            if (PropertyPanes.Any())
            {
                SelectedPropertyPaneIndex = 0;
            }
        }
Exemplo n.º 3
0
        private void RemovePropertyPaneByKey(string paneKey)
        {
            if (_customPropertyPanes.ContainsKey(paneKey) == false)
            {
                return;
            }

            var pane = _customPropertyPanes[paneKey];

            _customPropertyPanes.Remove(paneKey);
            PropertyPanes.Remove(pane);
        }