Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Accelerators to all Visual Elements #16202

@PureWeen

Description

@PureWeen

Description

We've added Accelerators to MenuItems #5211.

This spec proposes adding Accelerators to VisualElement. WinUI and Catalyst both support Accelerators at the base view level.

This spec is partially in response to #12004 where Accelerators will give users much more fine-grained control at the view level vs at a global level.

One of the primary reasons to use Accelerators over a Generic keyboard listener, is that this this lets the OS know what KeyCommands you've implemented short cut behavior against. With this information the OS can provide information to readers and better visual hints about available commands.

(Public) API Changes

VisualElement

Properties

API Description
Accelerators Bindable Property that let's you set as many Accelerators as you want.

Usage Scenarios

<StackLayout>
     <StackLayout.Accelerators>
                 <Accelerator Invoked="OnInvoked" Key="f" Modifiers="ctrl+space">
     </StackLayout.Accelertors>
</StackLayout>

Backward Compatibility

N/A

Difficulty

Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-keyboardKeyboard, soft keyboardpartner/cat 😻this is an issue that impacts one of our partners or a customer our advisory team is engaged withproposal/open

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions