Binding to other controlls InputBindings

Viewed 263

I would like to Bind Keybindings of my Button to the Keybindings of my Window.

My Window (Name="Mainwindow) Input Binding:

<Window.InputBindings>
    <KeyBinding Key="Return" Command="{Binding KeyPressed}" CommandParameter="Next"/>
</Window.InputBindings>

My idea of what the Button should look like

<Button Content="Select Directory" Command="{Binding BrowseDirectory}">
     <Button.InputBindings>
           <KeyBinding Key="Return" Command="{Binding ElementName=Mainwindow, Path=InputBindings}"/>
      </Button.InputBindings>
</Button>

Sadly the Outwindow did not display any kind of Binderror any anything else to give me a clue on why it is not working.
So baisically the question is: How can I Bind the Control.InputBindings to another Control.InputBindings?

1 Answers
Related