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

  • Home
  • SEARCH
  • 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 9178223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:30:07+00:00 2026-06-17T17:30:07+00:00

I have a popup with a TextBox that the user should enter a ticket

  • 0

I have a popup with a TextBox that the user should enter a ticket number into, and then when the user presses the enter key I want the ticket number to be passed to the ViewModel which will retrieve the ticket.

Here’s the xaml for the TextBox:

<TextBox x:Name="TicketNumber">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="KeyDown">
            <i:InvokeCommandAction Command="{Binding OpenTicketCommand}" 
                                   CommandParameter="{Binding ElementName=TicketNumber,
                                                              Path=Text}"/>
        </i:EventTrigger>
    </i:Interaction.Triggers>
</TextBox>

The above works on any keypress, but I really only want it to happen when the enter key is pressed. How would I go about doing that?

EDIT: I am assuming it would have to be done programmatically (hence the title), but if not that’s okay too.

  • 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-17T17:30:08+00:00Added an answer on June 17, 2026 at 5:30 pm

    You could use InputBindings - KeyBinding as alternative approach.

    Something like this:

    <TextBox x:Name="TicketNumber">
        <TextBox.InputBindings>
            <KeyBinding Key="Enter"
                        Command="{Binding OpenTicketCommand}" 
                        CommandParameter="{Binding ElementName=TicketNumber,
                                                   Path=Text}"/>
        </TextBox.InputBindings>
    </TextBox>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a TextBox and a Popup control. I want the Popup.IsOpen property to
I have a popup that stores a DataTable into a session so that after
I have a popup search box that is shown when the user mouses over
I have a problem: When I enter a text into suggestion text box, popup
I have a program where i use a modal popup that allows the user
I have a Silverlight user control that is a textbox with a search button
How to have numeric keyboard popup to input in TextBox on Windows Mobile 6.53?
I have a popup window (selectReasonCode) that is opened up from a button. The
I have a popup menu that has a few items in it. Option 1
I have a popup function in a program that works well, be re-loads the

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.