private void DockContent_IsFocusedChanged(object sender, BooleanArgs e) { //var docContent = sender as IDockContent; //if (docContent.IsFocused) //{ // var fwe = docContent.Content as FrameworkElement; // if (fwe != null) // fwe.Focus(); //} IDockContent activeControl = m_dockPanel.GetActiveContent(); if (activeControl != m_activeDockControl) { if (m_activeDockControl != null) { DeactivateClient(m_activeDockControl.Content); } if (activeControl != null) { ActivateClient(activeControl.Content); } m_activeDockControl = activeControl; } }
private void DockContent_IsFocusedChanged(object sender, BooleanArgs e) { // Deactivate the previously active content, and activate the newly focused one IDockContent activeControl = m_dockPanel.GetActiveContent(); if (activeControl != m_activeDockControl) { if (m_activeDockControl != null) { DeactivateClient(m_activeDockControl.Content); } if (activeControl != null) { ActivateClient(activeControl.Content); } m_activeDockControl = activeControl; } }
private void DockContent_IsFocusedChanged(object sender, BooleanArgs e) { //var docContent = sender as IDockContent; //if (docContent.IsFocused) //{ // var fwe = docContent.Content as FrameworkElement; // if (fwe != null) // fwe.Focus(); //} IDockContent activeControl = m_dockPanel.GetActiveContent(); if (activeControl != m_activeDockControl) { if (m_activeDockControl != null) DeactivateClient(m_activeDockControl.Content); if (activeControl != null) ActivateClient(activeControl.Content); m_activeDockControl = activeControl; } }