Hello All,

I am developing an application in WPF in which I need to set a generic input bindings for TAB key for every field present in the view. I somehow managed to create a common method but now I wnat to retrieve on which field the TAB key has been hit.

So, I want to know how can I pass a generic framework element or anything to the command parameter so that I can retrieve on which field the vent is taking place.

My xaml code is as follows :-

<Window.InputBindings>
     <KeyBinding Key="Tab" Command="{Binding TabCommand}" CommandParameter="{Binding .}" />
</Window.InputBindings>

Right now, using the above xaml code I am getting the whole window as the parameter but it can't show on which element the TAB has beet hit. Please help me if anyone knows how to get this solved.

Thanks a lot in advance.

I think may be no one could figure this out, anyways I got my own solution now by passing the whole UIElement as the parameter :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.