Page 1 of 1

KeyBindings in Noesis

Posted: 07 Apr 2015, 12:50
by peterh
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.

Re: KeyBindings in Noesis

Posted: 07 Apr 2015, 21:46
by sfernandez
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.

Re: KeyBindings in Noesis

Posted: 02 Sep 2015, 05:51
by Olex
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

Re: KeyBindings in Noesis

Posted: 02 Sep 2015, 09:30
by peterh
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.

Re: KeyBindings in Noesis

Posted: 03 Sep 2015, 18:08
by sfernandez
Yes, we fixed for 1.2.4 version ;)