In FocusElementManager.cs::manager_PreviewGotKeyboardFocus() the tracking of focus for ICommandSources is disabled. As a consequence, you have to click on a button twice, before the click is registered.
For example, look at AvalonDock.TestApp. Click on the textbox in the document. Then switch to the textbox in the tool window 1. Now click on the "Click to add 2 documents"-button. Nothing happens.
If the last focused element was an ICommandSource, than the focus is not restored correctly. For example, click on the textbox in the document. Then switch with tab to the "Click to add 2 documents"-button. Now click on the textbox in tool window 1. After clicking on the document1-tab, the focus should go to the button. but the textbox is focused, because the button implements ICommandSource and is ignored.
For example, look at AvalonDock.TestApp. Click on the textbox in the document. Then switch to the textbox in the tool window 1. Now click on the "Click to add 2 documents"-button. Nothing happens.
If the last focused element was an ICommandSource, than the focus is not restored correctly. For example, click on the textbox in the document. Then switch with tab to the "Click to add 2 documents"-button. Now click on the textbox in tool window 1. After clicking on the document1-tab, the focus should go to the button. but the textbox is focused, because the button implements ICommandSource and is ignored.