0
votes

Any idea how to, with no code behind, within a WPF TabControl, tab from the last control on a given TabItem (maybe a textbox) to the first control on the next TabItem?

1
With no code behind? why impose such rule? Too much MVVM?Eduardo Molteni
It's a legit question. Suppose I wanted to do this for each of a dozen screens -- I would rather reuse an attached behavior than have codebehind in each screen.Joe White
I agree with the ChrisWue answer. If you need to implement this ability in each of a number of instances, Derive and Conquer!CodeWarrior

1 Answers

2
votes

I think you'd either need to derive from TabControl and add a handler to the PreviewKeyDown or PreviewKeyUp event and then do the logic in there or maybe you can get away with an AttachedProperty which you can set to true on the TabControl doing essentially the same.

If by "no code behind" you mean "xaml only and I don't want to write any code whatsoever" then I don't think it's possible.