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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:36:14+00:00 2026-06-14T05:36:14+00:00

While searching this site, I’ve found this post Create a simple, unmodified key binding

  • 0

While searching this site, I’ve found this post Create a simple, unmodified key binding in WPF which shows how to bind a simple command to the a key. However I require a bit more than this. I’d like to also set a parameter to this command. A parameter which is will be bound to a text box, I use for input.
Here’s the code I have:

var textBinding = new Binding("Text") { Source = textBoxInput };
            buttonConfirmAddKitType.SetBinding(ButtonBase.CommandParameterProperty, textBinding);
            var keybinding = new KeyBinding
                                        {
                                            Key = Key.Enter,
                                            Command = command,
                                        };
            //Here I need a way to set the source of the command to the text of the input textbox, as done above
            textBoxInput.InputBindings.Add(keybinding);

The only missing piece here is how to bind the parameter of the key binding’s command to the text of my textbox, and I cant seem to find the answer anywhere. Help would be appreciated.

  • 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-14T05:36:15+00:00Added an answer on June 14, 2026 at 5:36 am
            var textBinding = new Binding("Text") { Source = textBoxInput };
            buttonConfirmAddKitType.SetBinding(ButtonBase.CommandParameterProperty, textBinding);
            var keybinding = new KeyBinding
            {
                Key = Key.Enter,
                Command = command,
            };
            keybinding.CommandParameter = textBoxInput.Text;
            textBoxInput.InputBindings.Add(keybinding);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While searching the web, I found this code: $apprequest_url =https://graph.facebook.com/ . /apprequests?ids=USERID_1,USERID_2,USERID_3 . &message='INSERT_UT8_STRING_MSG'
I'm searching a while for this and I can't found something that works for
I've started using .NET speech-to-text library (SpeechRecognizer) While googling and searching this site i
When searching for everything about getchar() function in this really great site, I found
I've been searching for this for a while and keep coming up short. However
I've been searching for a while and everybody seems to think this is not
While searching a bug in my code today I found a strange thing. When
I did some searching on this site and on google as well. But i
I've been searching for this problem for a while now. I'm trying to update
I found an nice script while searching and inspecting the elements of some websites.

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.