This project is read-only.

Suppressing left and right key press navigation

May 15, 2014 at 6:07 PM
Edited May 15, 2014 at 6:08 PM
Hello,

I would like to use the Left and Right keys in my application to control a radial button, but when I do it navigates to the pages in the LinkGroup.

I handle the keys on the MainWindow when the Control page is selected, and fire an event which the Controls page subscribes and routes the key to the control. But this prevents me from entering text in a text box on that page.
private void ModernWindow_PreviewKeyDown(object sender, KeyEventArgs e)
{
            if (ModernMenu.SelectedPage == @"/Pages/Controls.xaml")
            {

                e.Handled = true;

                if (OnMainKeyPress != null)
                    OnMainKeyPress(this, e);
            }
}
If possible, I would like to prevent the left and right keys from selecting the links in the menu. Does anyone know how to do this?

Thanks!