0

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.

1
Contributor
1
Reply
11
Views
3 Years
Discussion Span
Last Post by KM499
0

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 :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.