コード例 #1
0
ファイル: ControlHostService.cs プロジェクト: brobits/ATF
        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;
            }
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
ファイル: ControlHostService.cs プロジェクト: vincenthamm/ATF
        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;
            }
        }