peterh
Topic Author
Posts: 21
Joined: 13 Mar 2015, 13:50

KeyBindings in Noesis

07 Apr 2015, 12:50

I'm trying to define a KeyBinding for a UserControl, but have a problem due to a difference in the way InputBinding is implemented in Noesis, compared to WPF.

In WPF, I would write:
    <UserControl.InputBindings>
    	<KeyBinding Gesture="Tab" Command="{Binding NextCommand}"/>
    </UserControl.InputBindings>
This would result in the Tab key being bound to NextCommand whenever the UserControl is in focus.
This approach does not work in Noesis because InputBinding's properties are not dependency properties, like they are in WPF.

What would be the best way to acheive this behaviour in Noesis?

Edit: Fixed inaccurate description.
 
User avatar
sfernandez
Site Admin
Posts: 1918
Joined: 22 Dec 2011, 19:20

Re: KeyBindings in Noesis

07 Apr 2015, 21:46

Hi Peter,

You are right, InputBinding classes should inherit from Freezable and expose their properties as DependencyProperties to enable bindings (among other things).

Please create a ticket in our bugtracker (you will need to create an account there if you don't already have one) so you can follow the status of this issue.

Thanks for reporting.
 
Olex
Posts: 2
Joined: 01 Sep 2015, 00:18

Re: KeyBindings in Noesis

02 Sep 2015, 05:51

Hi, I signed up for the bugtracker account but still waiting on the email verification.
I am curious was this ever filed and what is the progress?

Alternatively, if I create an Animation can I simply invoke it from C++ code on my own upon detecting the key press without having to define KeyBinding in xaml?



Thanks,
Olex
 
peterh
Topic Author
Posts: 21
Joined: 13 Mar 2015, 13:50

Re: KeyBindings in Noesis

02 Sep 2015, 09:30

I filed this in the tracker, and it was included in 1.2.4 http://www.noesisengine.com/docs/Gui.Co ... gelog.html
Enhancement InputBindings are now DependencyObjects and Command is a DependencyProperty so bindings can be set.
 
User avatar
sfernandez
Site Admin
Posts: 1918
Joined: 22 Dec 2011, 19:20

Re: KeyBindings in Noesis

03 Sep 2015, 18:08

Yes, we fixed for 1.2.4 version ;)

Who is online

Users browsing this forum: No registered users and 1 guest