private void DockPanel_ActiveContentChanged(object sender, DockContentEventArgs e) { if (e.Content == VisibleContent || !_contents.Contains(e.Content)) { return; } VisibleContent = e.Content; foreach (var content in _contents) { content.Visible = content == VisibleContent; } EnsureVisible(); Invalidate(); }
private void DockPanel_ContentRemoved(object sender, DockContentEventArgs e) { if (_toolWindows.Contains(e.Content)) BuildWindowMenu(); }
private void DockPanel_ActiveContentChanged(object sender, DockContentEventArgs e) { if (!_contents.Contains(e.Content)) return; if (e.Content == VisibleContent) { VisibleContent.Focus(); return; } VisibleContent = e.Content; foreach (var content in _contents) content.Visible = content == VisibleContent; VisibleContent.Focus(); EnsureVisible(); Invalidate(); }