Ejemplo 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);
        }
Ejemplo n.º 2
0
        public void Handle(ShowPropertyPaneMessage message)
        {
            var paneKey = string.Format("{0}_{1}_{2}", message.Sender.GetType().AssemblyQualifiedName, message.Sender.GetType().FullName, message.Title);

            if (_customPropertyPanes.ContainsKey(paneKey) == false || _customPropertyPanes[paneKey] == null)
            {
                var newPane = new RadPane();
                newPane.CanDockInDocumentHost = false;
                newPane.CanUserClose          = message.IsUserCloseable;

                _customPropertyPanes[paneKey] = newPane;
            }

            var pane = _customPropertyPanes[paneKey];

            pane.Content = message.PaneContent;
            pane.Header  = message.Title;

            if (PropertyPanes.Contains(pane) == false)
            {
                PropertyPanes.Add(pane);
            }

            FocusPropertyPane(pane);
        }