Home Dashboard Directory Help
Search

The KeyBinding.Command property should be a DependencyProperty by omjbe


Status: 

Closed
 as Fixed Help for as Fixed


5
0
Sign in
to vote
Type: Bug
ID: 431001
Opened: 4/7/2009 12:51:41 AM
Access Restriction: Public
0
Workaround(s)
view
2
User(s) can reproduce this bug

Description

The KeyBinding.Command property should be a DependencyProperty so that {Binding ...} can be used.

At the moment it is only possible to define static commands for this property. E.g.

<Window.InputBindings>
<KeyBinding Command="ApplicationCommands.New" Key="N" Modifiers="Control"/>
</Window.InputBindings>

But I need to bind to the PresentationModel which is set as DataContext to the Window:

<Window.InputBindings>
<KeyBinding Command="{Binding NewCommand}" Key="N" Modifiers="Control"/>
</Window.InputBindings>

Unfortunately, this doesn work.
Details
Sign in to post a comment.
Posted by Microsoft on 5/27/2009 at 10:44 AM
Thank you for sending this request. We have added this feature in .NET 4.0 and it should be available in .NET 4.0 Beta 2.

Thanks!
Samantha
Program Manager, WPF Tree Services & Controls
Posted by Microsoft on 4/7/2009 at 10:31 PM
Thanks for reporting this issue. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Sign in to post a workaround.