Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7174925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:10:01+00:00 2026-05-28T16:10:01+00:00

I am only beginning to learn MVVM and its use in WPF. I am

  • 0

I am only beginning to learn MVVM and its use in WPF.

I am using it to build a very simple Calculator application (like the Windows built in calculator).

One thing i’ve noticed, is that binding my view (XAML) to commands does not let me configure WHEN these actual commands are fired.

For example, a Button control fires the command bound to it when it is clicked.

I would like to achieve the same effect when the numpad buttons are presed (‘1’ will fire the Command of the “1” Button control, and so on).

I could not find 1 way to do this, all sites seem to show multiple other options which don’t seem valid in this case.

Should this be set up in the Control’s (Button) level or on the entire window? How can i do this ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:10:02+00:00Added an answer on May 28, 2026 at 4:10 pm

    Try to set input bindings of your main window.

    <Window.InputBindings>
        <KeyBinding Key="D1" Command="{Binding Command1}" />
        <KeyBinding Key="NumPad1" Command="{Binding Command1}" />
    </Window.InputBindings>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm converting a Struts1 application to Struts2 . As a beginning I only ported
I imagine this pertains to Hibernate only (I'm just now beginning to use these
I'm beginning to learn about the use of structs in C. It's challenging and
I am beginning to learn OpenGL ES 1.1 for iPhone and would like to
strip_tags only catches tags that have a beginning and end tag. With the strings
I created a script that requires selecting a beginning year then only displays years
Using only ANSI C, what is the best way to, with fair certainty, determine
I'm beginning to learn javascript and I wrote an infinite loop <script> while(1==true){ document.write(hello
I'm only really beginning IOS development but have a few years dev of ASP.net
I'm beginning to learn Struts 2, and am wondering: Which is the most popular

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.