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 8359267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:05:34+00:00 2026-06-09T11:05:34+00:00

I am making a calculator using WPF Application in MS Visual Studio 2010. I

  • 0

I am making a calculator using WPF Application in MS Visual Studio 2010. I have made different buttons that are in a standard calculator and I have added button_Click methods on them. Now I also want to perform the same tasks as the button_Click method is performing by stroking the specific key.

For Example

I have “addButton_Click” method and it performs this:

    private void addButton_Click(object sender, RoutedEventArgs e)
    {
        _op = 1;    
        temp = displayPannel.Text;
        check = true;
    }

Now What If I wanted the “+” key to do the same thing in the calculator instead of using the mouse to click on “+” button. Also I want to use the numeric keys as well along with the mouse clicking. How can I do it?

  • 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-06-09T11:05:35+00:00Added an answer on June 9, 2026 at 11:05 am

    MainWindow.xaml.cs

      private void TextBox_PreviewKeyUp_1(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.OemPlus || e.Key == Key.Add)
                MessageBox.Show("Tada");
        }
    

    MainWindow.xaml

        <TextBox Text="Hello" PreviewKeyUp="TextBox_PreviewKeyUp_1"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making my first program using Java3D. I have setup some transformGroups that
I would like my application after making it five calculations. That is, using 5
I'm trying to learn .NET and WPF, and I'm making a calculator type application
I have made a control which has a property that is calculated by using
I am making a small calculator (just for JavaScript learning) and I have two
I'm making an application that gives clients and approximate loan offer (they are later
I'm making a console calculator, and I want to remove any whitespace that the
I am making a Java Desktop Application using Netbeans. I am new to Desktop
I'm making a calculator in Java using Processing as a framework. I'm writing a
I'm making a horizontal scroller using jQuery. I have it working using the following

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.