Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have an App that has a Viewport3D control. The user 'navigates' the Camera around the 3D 'model' using the Keyboard keys.

The 3D navigation worked fine until I added a Menu to the App.

Is there a way to change the default behaviour of the Menu, so that the Up/Down/Left/Right Arrow keys do not affect it?

(I am using Vulcan.NET but a XAML or C# answer will be just as helpful.)

Thanks, JAJB
Posted

I would highly recommend you to use different approach.
Even if you successfully modify your menu behavior and make if operational, it will confuse your users... well beyond your expectations. They may easily refuse working with your application because of such tiny things.

Approach #1. On the event of activation of your menu, disable your 3D navigation, and re-enable when any menu item is fired or menu is escaped. This is fairly easy to do. If this is not clear, please ask; perhaps I will help you (first, with C#, second: I'll need some time).

Approach #2. Sacrifice your keystrokes you currently use for 3D navigation; for example, use Alt+Left, Alt+Right, etc. With Alt, additional effect is that menu will be escaped.

Approach #1 is better.
 
Share this answer
 
v3
Comments
Espen Harlinn 16-Jan-11 5:04am    
5+ Reasoned answer
Thank you for your suggestions.

Approach #1. When deliberately activating the menu there is no problem (the navigation is not affected). When navigating, the menu unfortunately reacts to navigation key-presses but only sometimes.

I don't understand your Approach #2. But meanwhile I will experiment with Focus methods.

Thank you,

JAJB
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900