Exemple #1
0
        private void _dockPanel_ActiveDocumentChanged(object sender, EventArgs e)
        {
            if (_lastActiveDockContent != null)
            {
                if (!_lastActiveDockContent.IsDisposed)
                {
                    _lastActiveDockContent.RaiseShow(NiWindowShow.Deactivate);
                }

                _lastActiveDockContent = null;
            }

            _lastActiveDockContent = (DockContent)_dockPanel.ActiveDocument;
            _windowPaneSelection.ActiveDocument =
                _lastActiveDockContent == null
                ? null
                : _lastActiveDockContent.WindowPane;

            if (_lastActiveDockContent != null)
            {
                _lastActiveDockContent.RaiseShow(NiWindowShow.Activate);
            }
        }