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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:53:44+00:00 2026-05-23T00:53:44+00:00

i want to execute a command if the KeyDown-event occurs. This command should only

  • 0

i want to execute a command if the KeyDown-event occurs. This command should only be fired if the Enter-Key was pressed.

How can I realize that in a MVVM-architecture?

I am using WPF and VB.NET.

Thank you!

  • 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-23T00:53:45+00:00Added an answer on May 23, 2026 at 12:53 am

    The easiest way is to implement some kind of AttachedBehavior which allows you to hook a ViewModel command to a KeyDown event.

    Usually I use the code posted here for attaching VM Command’s to XAML Events, however I have not tested it with a KeyDown event.

    If that doesn’t work, I believe other 3rd party toolkits such as Prism or MVVM Light have their own implementation of the behavior

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I execute a command line from within a WiX script? I want
Is this possible in AppleScript? Do I just want to execute a shell command
I want to execute this command mysql -u root -e source F:\dump.sql How do
I want to execute a command as root with shell_exec. Now I know this
I want to execute this command: /ceplinux_work3/myName/opt/myCompany/ourProduct/bin/EXECUTE_THIS -p cepamd64linux.myCompany.com:19021/ws1/project_name < /ceplinux_work3/myName/stressting/Publisher/uploadable/00000.bin >> /ceplinux_work3/myName/stressting/Publisher/stats/ws1.project_name.19021/2011-07-22T12-45-20_PID-2237/out.up But
I want to execute following command in shell script cp /somedire/*.(txt|xml|xsd) /destination/dir/ But this
From my Eclipse plugin, I want to execute a command and show the results
I want to execute a command, have the output of that command get gzip'd
There are often times that I want to execute a command on all files
How can I execute a command in Vim, under the cursor? On the (word)

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.