Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
330
ContentPane FocusScope issues
posted

Hello,

We have a requirement that all the pane's share the same focus scope. This is so that we don't have ribbon contextual groups showing up from multiple logical scopes across different panes that all have focus. 

Setting FocusManager.IsFocusScope="False" on the ContentPane resolves this issue for us, however, it introduces a new issue. When the window is floated, you can no longer tab through controls.  I have verified this is still an issue in 14.2. Anyone how I might have floated pane's share the same focus scope? I thought maybe overriding GetUIParentCore to return the XamDockManager, but that did not resolve it.

Example xaml that demonstrates the issue:

<Window x:Class="Xam_DockManagerTest.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      mc:Ignorable="d"
      d:DesignHeight="500" d:DesignWidth="700"
      Title="Floating"
      xmlns:igDock="http://infragistics.com/DockManager">
    <igDock:XamDockManager Theme="IGTheme">
        <igDock:XamDockManager.Panes>
            <igDock:SplitPane igDock:XamDockManager.InitialLocation="DockableFloating"
                              igDock:XamDockManager.FloatingLocation="550,200"
                              SplitterOrientation="Vertical">
                <igDock:TabGroupPane>
                    <igDock:ContentPane x:Name="floatingDockable1"
                                        MinHeight="75"
                                        FocusManager.IsFocusScope="False">
                        <StackPanel Orientation="Vertical">
                            <TextBox Text="Test1"/>
                            <TextBox Text="Test2"/>
                            <TextBox Text="Test3"/>
                        </StackPanel>
                    </igDock:ContentPane>
                </igDock:TabGroupPane>
            </igDock:SplitPane>
        </igDock:XamDockManager.Panes>
    </igDock:XamDockManager>
</Window>

  • 34810
    Offline posted

    Hello mikebm,

    Thank you for your post!

    I have been investigating this issue regarding focus on XamDockManager floating panes, and I have a couple of questions for you. In your description, you mention ribbon contextual groups showing up among multiple logical scopes, but in the sample code you have provided, I am not seeing a ribbon control included. Could you please provide some detail as to where you are using the ribbon control(s) in this case? Also, could you provide some more detail on the behavior you are seeing with the ribbon contextual groups between focused panes?

    Regarding the textboxes not being able to be tabbed between when setting FocusManager.IsFocusScope to false, I have been able to reproduce this. I believe this is because when you set IsFocusScope to false for the content pane, it applies to each element in its content as well. This disallows the tab operation, and so you cannot tab through each textbox.

    I also found this link to a page about focus operations that may help you: http://blogs.msdn.com/b/visualstudio/archive/2010/03/09/wpf-in-visual-studio-2010-part-3-focus-and-activation.aspx. I encourage you to take a look at it.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support