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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:34:10+00:00 2026-06-13T05:34:10+00:00

I am writing a metro app where it makes sense for focus to jump

  • 0

I am writing a metro app where it makes sense for focus to jump to a single text box anytime the user starts typing. But I can’t figure out how to implement this functionality locally, without modifying other user controls to detect keydown and forward focus to the text box.

In WinForms I would have used the form’s “KeyPreview” property, which caused any key presses within the form’s controls to fire form KeyDown/KeyPress/KeyUp events. I can’t find any equivalent in metro.

I tried the naive solution of just forcing focus to the text box anytime it left, but that has obvious problems (e.g. buttons flicker instead of staying highlighted when you click and hold on them).

How can I ensure any keyboard typing goes to a specific text box?

  • 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-13T05:34:11+00:00Added an answer on June 13, 2026 at 5:34 am

    The event needs to be placed on the current core window, which is the root element all controls are nested on.

    Windows.UI.Xaml.Window.Current.CoreWindow.KeyDown += (sender, arg) => {
        // invoked anytime a key is pressed down, independent of focus
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a metro app. This works: HttpClient client = new HttpClient(); var
I'm writing a Windows 8 Metro app (client-server) and would like to allow my
I am writing a Metro App that will only run on PCs (so there
I am writing a Metro App. I am trying to read a file and
I'm writing a Metro app in Windows 8 Consumer Preview. However, I'm unable to
I'm writing a Windows 8 Metro app in C#/XAML. One of the core functions
I'm currently writing a C# metro app for the Windows 8 consumer preview which
I'm writing a Windows 8 Metro app with a GridView with several pages worth
I'm writing an app for Windows 8 Metro and am having a problem understanding
I am writing a Windows 8 Store App (Metro / Modern?) and I am

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.