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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:54:39+00:00 2026-06-09T22:54:39+00:00

WPF allows me to easily bind keyboard shortcuts at the window level to a

  • 0

WPF allows me to easily bind keyboard shortcuts at the window level to a method using the InputBindings property. What is the equivalent of this in WinRT? What is the right way to bind keyboard shortcuts to methods in WinRT?

  • 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-09T22:54:40+00:00Added an answer on June 9, 2026 at 10:54 pm

    Keyboard shortcuts are described here. I think you want either access keys or accelerator keys.

    An access key is a shortcut to a piece of UI in your app. Access keys consist of the Alt key plus a letter key.

    An accelerator key is a shortcut to an app command. Your app may or may not have UI that corresponds exactly to the command. Accelerator keys consist of the Ctrl key plus a letter key.

    The following example demonstrates the accessible implementation of shortcut keys for media play, pause, and stop buttons:

    <MediaElement x:Name="Movie" Source="sample.wmv"
      AutoPlay="False" Width="320" Height="240"/>
    
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
    
      <Button x:Name="Play" Margin="1,2"
        ToolTipService.ToolTip="shortcut key: Ctrl+P"
        AutomationProperties.AccessKey="Control P">
        <TextBlock><Underline>P</Underline>lay</TextBlock>
      </Button>
    
      <Button x:Name="Pause" Margin="1,2"
        ToolTipService.ToolTip="shortcut key: Ctrl+A"
        AutomationProperties.AccessKey="Control A">
        <TextBlock>P<Underline>a</Underline>use</TextBlock>
      </Button>
    
      <Button x:Name="Stop" Margin="1,2"
        ToolTipService.ToolTip="shortcut key: Ctrl+S"
        AutomationProperties.AccessKey="Control S">
        <TextBlock><Underline>S</Underline>top</TextBlock>
      </Button>
    
    </StackPanel>
    
    <object AutomationProperties.AcceleratorKey="ALT+F" />
    

    Important: Setting AutomationProperties.AcceleratorKey or
    AutomationProperties.AccessKey doesn’t enable keyboard functionality.
    It only reports to the UI Automation framework what keys should be
    used, so that such information can be passed on to users via assistive
    technologies. The implementation for key handling still needs to be
    done in code, not XAML. You will still need to attach handlers for
    KeyDown or KeyUp events on the relevant control in order to actually
    implement the keyboard shortcut behavior in your app. Also, the
    underline text decoration for an access key is not provided
    automatically. You must explicitly underline the text for the specific
    key in your mnemonic as inline Underline formatting if you wish to
    show underlined text in the UI.

    See @Magiel’s answer for implementation details for the code-side of things.

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

Sidebar

Related Questions

In WPF I have one window opening a second window that allows some data
WPF allows to specify linear affine transform on graphical objects. With this you can
WPF doesn't provide the ability to have a window that allows resize but doesn't
I have a WPF window that manages sets of configurations and it allows users
The Wpf combo box allows editing, and this is fine if all your combo
I have a wpf application that is using a NavigationWindow that allows me to
In WPF we have Window.ShowDialog() which allows showing a modal dialog box. In WinForms
I've got a WPF app that's using INotifyPropertyChanged to signal property updates. What I
Is there a custom UserControl created in WPF that allows for RDP access. I
I'm writing a utility program with C# in WPF that allows users to create

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.