コード例 #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);
        }
コード例 #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);
        }
コード例 #3
0
        private void ClearCustomPropertiesPane()
        {
            CustomPropertyPane.Content = null;
            PropertyPanes.Remove(CustomPropertyPane);

            if (PropertyPanes.Any())
            {
                SelectedPropertyPaneIndex = 0;
            }
        }
コード例 #4
0
        private void RemovePropertyPaneByKey(string paneKey)
        {
            if (_customPropertyPanes.ContainsKey(paneKey) == false)
            {
                return;
            }

            var pane = _customPropertyPanes[paneKey];

            _customPropertyPanes.Remove(paneKey);
            PropertyPanes.Remove(pane);
        }
コード例 #5
0
 private void FocusPropertyPane(RadPane pane)
 {
     SelectedPropertyPaneIndex = PropertyPanes.IndexOf(pane);
 }