dotnet / dotnet/maui

No support to remove or modify visual focus style

Open
#10,193 5 comments 1 reaction 0 assignees View on GitHub
area-xaml legacy-area-controls platform/windows t/enhancement ☀️
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

The visual focus style is applied to controls in Tab key press on windows platform. But there is no support to remove or modify this focus style.

Focus style is not applied on MacCatalyst. so in our control, we handle this style locally on tab key press but in the windows platform, we cannot change this style.

In native WinUI platform, we can restrict this using [IsTabStop ](https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.control.istabstop?view=winrt-22621) and [usesystemfocusvisuals](https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.control.usesystemfocusvisuals?view=winrt-22621) API's.

### Steps to Reproduce

1. Run any sample with a button control.
2. Press tab key and the default visual focus style will be applied.

Screenshot 2022-09-18 200314

### Link to public reproduction project repository

https://github.com/KarthikRajaAKR/Samples/tree/main/VisualFocus

### Version with bug

6.0.486 (current)

### Last version that worked well

Unknown/Other

### Affected platforms

Windows

### Affected platform versions

Windows SDK 10.0.19041

### Did you find any workaround?

No

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked VisualFocus reproduction and the Windows control handling in .NET MAUI. Compare the requested IsTabStop and UseSystemFocusVisuals behavior with the current tab-focus behavior, then verify that Windows controls can remove or modify the visual focus style without changing the MacCatalyst behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.