This project is read-only.

How to do inputbindings in a ModernUi project

Oct 4, 2014 at 8:28 AM

I have a verty simple ModernUi application containing a ModerUIWindow which content is set to an usercontrol.

My problem is that I want to implement a generel KeyBinding on the UserControl and maybe later on also a keybinding on application level (the ModerUiWindow I assume).

I have tried to do:
  <KeyBinding Command="{Binding SomeCommand}" Key="F5"/>
But nothing happens. The "SomeCommand" is never executed.

Also tried to place the code on Window level as I assume it has something to do with focus, but I haven't been able to do it. It might be kind of an easy question so hopefully somebody are able to answer me quickly/shortly.

Thanks in advance
Oct 6, 2014 at 9:11 PM
Are you hosting your content in a ModernFrame instance? Previous versions of MUI included a keybinding for refreshing the content on F5. The latest version of MUI no longer includes that keybinding. Could that be the case?
Oct 6, 2014 at 9:29 PM
No I am not using a ModernFrame instance. And the F5 was just an arbitrary keybinding used for this thread.
Oct 7, 2014 at 7:38 AM

Maybe I could ask you in another way.

In your Modern Ui Demo. How could/would you implement that fx. LEFT and RIGHT arrow will change the active Linkgroup. For now this only works if linkgroup has focus. I want this functionality to a specific content/page or maybe also in generel all over the application.

Hope this make sense to you:-)
Oct 12, 2014 at 2:33 AM

I found a solution to this myself inspired by this link:

Attached properties/behavior