Skip to content

Add SelectTextOnFocusBehavior to automatically select the content of a TextBox when it is focused.#836

Open
vgromfeld wants to merge 3 commits intoCommunityToolkit:mainfrom
vgromfeld:selectTextOnFocusBehavior
Open

Add SelectTextOnFocusBehavior to automatically select the content of a TextBox when it is focused.#836
vgromfeld wants to merge 3 commits intoCommunityToolkit:mainfrom
vgromfeld:selectTextOnFocusBehavior

Conversation

@vgromfeld
Copy link
Contributor

@vgromfeld vgromfeld commented Mar 16, 2026

Fixes

Add a new SelectTextOnFocusBehavior to automatically select the content of a TextBox when it is focused.

PR Type

What kind of change does this PR introduce?

  • New behavior for TextBox controls

What is the new behavior?

I'm adding a new behavior which will can be attached to TextBox controls. This behavior will automatically select the TextBox content when the control receives the focus.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs
  • New component
    • Documentation has been added
    • Sample in sample app has been added
    • Analyzers are passing for documentation and samples
    • Icon has been created (if new sample) following the Thumbnail Style Guide and templates
  • Tests for the changes have been added (if applicable)
  • Header has been added to all new source files
  • Contains NO breaking changes

Other information

I'm also updating the slngen dependency to the latest available version to allow it to run on ARM64 devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant