Welcome to Windows Presentation Foundation (WPF)
Top Tasks :

WPF Community Bloggers

Supporting Input Binding for the Delegating Command

So after some research, I discovered what it takes to support Input Binding (E.G. key gestures) for the Delegating Command : absolutely nothing. Although you can configure a Routed Command's Input Bindings using the Command Manager, you can also do it in XAML using UIElement.InputBindings like so: <Window.InputBindings> <KeyBinding Key="B" Modifiers="Control" Command="ApplicationCommands.Open" /> </Window.InputBindings> Here's the really fun part. You can configure Input Bindings for any ICommand (like a Delegating Command exposed as a property on your View Model (or Acropolis Part)). In all honesty, I'm seeing less and less use for Routed Commands. I for one won't be using them going forward. It's time for us to begin sailing the 4C's again. I've just dusted off Part Two of Code Climber Custom Controls and it's going to be a doozy just like it's predecessor . It just needs one more evening/morning writing cycle to complete. Read More...
Published Thursday, October 18, 2007 8:00 AM by Brownie Points
Filed under:

Comments

No Comments
Anonymous comments are disabled

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us