public void CreateEditorPropertyWindow()
        {
            XMLEditorPropertyControl editorPropertyWindow = null;
            if (_propertyWindowPlace != null)
            {
                editorPropertyWindow = new XMLEditorPropertyControl();
                editorPropertyWindow.textBoxLeft.Text = DocumentLayout.Size.Left.ToString();
                editorPropertyWindow.textBoxTop.Text = DocumentLayout.Size.Top.ToString();
                editorPropertyWindow.textBoxRight.Text = DocumentLayout.Size.Right.ToString();
                editorPropertyWindow.textBoxBottom.Text = DocumentLayout.Size.Bottom.ToString();
                editorPropertyWindow.textBoxBackgroundImage.Text = DocumentLayout.BackgroundImage;

                editorPropertyWindow.Parent = _propertyWindowPlace;
                editorPropertyWindow.Dock = DockStyle.Top;
                editorPropertyWindow.OnDataSourceChanged += delegate { ApplyEditorSettings(editorPropertyWindow); };

                editorPropertyWindow.Show();
            }

            if (_currentPropertyWindow != null)
            {
                _currentPropertyWindow.Hide();
                _currentPropertyWindow.Dispose();
            }
            _currentPropertyWindow = editorPropertyWindow;
        }
        public void DestroyPropertyWindow()
        {
            if (_currentPropertyWindow != null)
                _currentPropertyWindow.Dispose();

            _currentPropertyWindow = null;
        }
        public void CreateControlPropertyWindow(IEditorControl xmlControl)
        {
            XMLPropertyControlBase newPropertyWindow = null;
            if (_propertyWindowPlace != null)
            {
                newPropertyWindow = xmlControl.GetPropertyWindow();
                newPropertyWindow.OnDataSourceChanged += delegate { ApplyDataSource(_currentPropertyWindow); };

                newPropertyWindow.Parent = _propertyWindowPlace;
                newPropertyWindow.Dock = DockStyle.Top;
                newPropertyWindow.Show();
            }

            if (_currentPropertyWindow != null)
            {
                _currentPropertyWindow.Hide();
                _currentPropertyWindow.Dispose();
            }

            _currentPropertyWindow = newPropertyWindow;
        }