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
20
Nested Dockmanager does not support the ApplicationCommands.Copy command
posted

When nesting a  dock manager(child) into another(parent) then the built-in WPF copy RoutedCommand is not invoked corectly when it tunnels down to a element that is hosted by the child dock manager.

I think it is easier to explain using the  code bellow.

<Window x:Class="CopyIssue.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525"
        xmlns:xam="http://infragistics.com/DataPresenter" 
        xmlns:igd="http://infragistics.com/DockManager">
   
    <StackPanel>
        <Menu>
            <MenuItem Command="ApplicationCommands.Copy" Width="75" Focusable="False"/>
        </Menu>
        <igd:XamDockManager>
            <igd:DocumentContentHost>
                <igd:SplitPane>
                    <igd:TabGroupPane>
                        <igd:ContentPane>
                            <StackPanel>
                                <igd:XamDockManager>
                                    <igd:DocumentContentHost>
                                        <igd:SplitPane>
                                            <igd:TabGroupPane>
                                                <igd:ContentPane>
                                                    <StackPanel>
                                                        <TextBox Text="That does not work"></TextBox>
                                                    </StackPanel>
                                                </igd:ContentPane>
                                            </igd:TabGroupPane>
                                        </igd:SplitPane>
                                    </igd:DocumentContentHost>
                                </igd:XamDockManager>
                                <TextBox Text="That works"></TextBox>
                            </StackPanel>
                        </igd:ContentPane>
                    </igd:TabGroupPane>
                </igd:SplitPane>
            </igd:DocumentContentHost>
        </igd:XamDockManager>
    </StackPanel>
</Window>

 

As you can see there is a menu item that is bound to the ApplicationCommands.Copy command. This command will be invoked correctly in case if the text is selected from the text box in the parent dock manager, but for the text box in the child container nothing will happen(the selected text will not be copied)

It looks like a bug, but maybe I missed something?