KeyBindings in Noesis
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:
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.
In WPF, I would write:
Code: Select all
<UserControl.InputBindings>
<KeyBinding Gesture="Tab" Command="{Binding NextCommand}"/>
</UserControl.InputBindings>
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.
-
-
sfernandez
Site Admin
- Posts: 2021
- Joined:
Re: KeyBindings in Noesis
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.
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
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
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
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.
-
-
sfernandez
Site Admin
- Posts: 2021
- Joined:
Re: KeyBindings in Noesis
Yes, we fixed for 1.2.4 version 

Who is online
Users browsing this forum: Tiddan and 1 guest