Is there a way I enable users to switch tabs in a tab control using control-pageup/pagedown (as in Chrome), so I can free up control-tab for use in the body of the tab? Do I have to write a previewKeyDown or something, switch tabs programmatically and set event.Handled = true? In that case, how do I stop xamTabControl from interfering with the ctrl-tab keypress?
Thanks.
John.
Hello John,
Thank you for your post.
I have been looking into your requirements. What I can suggest is to handle the PreviewKeyDown event of XamTabControl and set the IsTabStop wpf property. To stop the Ctrl + Tab combination you can use Keyboard.Modifiers method in 'if' statement in the event handler and set e.handled to true. Also you can move the tabs with PageUp and PageDown buttons by checking in the event handler for it and change the selected item by changing the selected index. You can change it by using SelectedIndex property of XamTabControl. I created a short sample application to show you how you can achieve the functionality that you want. Please let me know if I missing something.
Please let me know if you need from any further assistance on this matter.
Thanks, Zhivko, but it doesn't help. As I said in my original post, I need to be able to use ctrl-TAB in my own program.
I'm attaching a modified version of what you sent me. As you can see, the TextBox inside the tab has AcceptsTab="True". Once I fall into that TextBox, I want to be able to use ctrl-Tab to get out of it. Setting e.Handled=True in the preview key handler prevents ctrl-tab from being seen by the TextBox.
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.