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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:34:45+00:00 2026-05-19T16:34:45+00:00

I am wanting to receive keyboard input from a Popup control that acts as

  • 0

I am wanting to receive keyboard input from a Popup control that acts as the root visual for a touch screen keyboard control. I’m wanting the control to support keyboard input as well as touch screen input. I hook up the events (PreviewKeyDown and KeyDown) and they are never fired.

  • 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-19T16:34:46+00:00Added an answer on May 19, 2026 at 4:34 pm

    A Popup is not focusable by default and even if it is focusable, you have to have something else focusable on the popup and then get it focused or give it the focus in order for it to receive keyboard event.

    In other words, if you want keyboard event from the Popup use Focusable="True" and put a focusable control like a TextBox or a Button or a ListBox and either let the user give it the focus by clicking on it or manually use Focus() from code. If you do all these things then PreviewKeyDown should fire for the Popup.

    Here is a little demonstration program with a toggle button that opens a Popup and that shows a slider increasing whenever we get a PreviewKeyDown event on a Popup:

    <Grid>
        <StackPanel>
            <Slider Name="slider1"/>
            <ToggleButton x:Name="toggleButton1" 
                          Content="Open Popup"/>
        </StackPanel>
        <Popup PlacementTarget="{Binding ElementName=toggleButton1}" 
               IsOpen="{Binding IsChecked, ElementName=toggleButton1, Mode=OneWay}" 
               Focusable="True">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="PreviewKeyDown">
                    <ei:ChangePropertyAction TargetObject="{Binding ElementName=slider1}" 
                                             PropertyName="Value" 
                                             Value="1" 
                                             Increment="True"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
            <TextBox Background="White" 
                     Focusable="True">
                <TextBox.Text>Sample Popup content.</TextBox.Text>
            </TextBox>
        </Popup>
    </Grid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ipod touch program that should receive messages from a server program
I'm trying to use regex to validate input from the user, I'm wanting to
I am wanting to create an application that will monitor the upload/download traffic of
I have a multicast receive daemon that is running as a NSThread. While it's
I am wanting to make a TCP server that listens on port 443 so
What is the best way to send and receive netlink messages from userspace in
I need to build an application which can receive data from over a network
i want my java code to send and receive response from ntp server. however,
The problem that I have is that the app starts to receive memory warnings
I'm writing an API and I'm wanting to handle file uploads from a form

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.