protected override sealed bool TranslateAcceleratorCore(ref MSG msg, ModifierKeys modifiers)
{
if (_hwndSource != null) {
HwndSourceHostRoot root = (HwndSourceHostRoot)_hwndSource.RootVisual;
Debug.Assert(root.IsLogicalParentEnabled);
root.IsLogicalParentEnabled = false;
try {
return ((IKeyboardInputSink)_hwndSource).TranslateAccelerator(ref msg, modifiers);
} finally {
root.IsLogicalParentEnabled = true;
}
} else {
return base.TranslateAcceleratorCore(ref msg, modifiers);
}
}