private void FlickerFocusToForceBindingCommit()
{
Control currentControl = Keyboard.FocusedElement as Control;
if (currentControl != null)
{
// Force focus away from the current control to update its binding source.
currentControl.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
currentControl.Focus();
// moving next is not enough, as the next item could be a menu item (in a different focus
// scope) so also try the previous command.
currentControl.MoveFocus(new TraversalRequest(FocusNavigationDirection.Previous));
currentControl.Focus();
}
}