The KeyBinding.Command property should be a DependencyProperty - by omjbe

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


5
0
Sign in
to vote
ID 431001 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 4/7/2009 12:51:41 AM
Access Restriction Public

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.
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