Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: Button inside AvalonDock LayoutAnchorable focus problem [20496]

$
0
0
Buttons inside a LayoutAnchorable pane do not work if another Anchorable pane was active when the button is clicked. There seems to be some focus problem.

This is caused by the check for "!(focusedElement is ICommandSource)" in FocusElementManager.cs. The check causes buttons (and all other ICommandSources) not to be registered as the last focused element for the containing parent LayoutAnchorableControl. When a button is clicked and the buttons container LayoutAnchorableControl is not active, it is implictly activated by the DockingManager. The DockingManager eventually calls FocusElementManager.SetFocusOnLastElement from a deferred (BeginInvoke) handler. This causes the focus to be "stolen" away from the clicked button. If the click is "slow", the button's command does not get executed.

Removing the "!(focusedElement is ICommandSource)" condition from the if-clause fixes the problem, but I don't know if this introduces other issues. What's the point of excluding ICommandSources from the normal controller logic?
Comments: ** Comment from web user: BoucherS **

this is fixed in v2.1.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>