X key behavior issues

Nov 26, 2013 at 3:26 PM

When I press the X key the value is prevented from being entered and the focus is placed on the X button of the Tab of the SessionsTabControl.

If I modify the _X in the template of the SessionsTabControl to something else the behavior changes to auto close the hosted application.

Can someone please tell me if this is baked into CCA? If there is a keydown, previewkeydown or some other key event handler that is taking over when an X is pressed and if so how to remove it.

Dec 3, 2013 at 2:15 PM
Edited Dec 3, 2013 at 2:24 PM
Found issue/solution.

In WPF when you specify an _ (underscore) in front of any character in the Content property it wires up an AccessKey (HotKey shortcut) event that will interject the key press and auto click the button.

There are two occurrences of this in CCA. One is in the WpfSessionTabsControl xaml file and the other is in the Microsoft.Uii.Csr.AifWpfTabControl class (baked in CCA).

I was able to resolve the second occurrence by adding an event handler to the WpfPanel and change the Content of the Button.