Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Implement SearchBar CancelButtonColor on Windows #13622

Merged
merged 7 commits into from
Mar 22, 2023
Merged

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Implement SearchBar CancelButtonColor on Windows. Checking new issues and adding label, I've seen that 13507 happens basically because it's not implemented. This PR implement the changes in the CancelButtonColor proprerty.
image

To validate the changes cacn use the SearchBar sample from the .NET MAUI Gallery or the added tests.
image

Issues Fixed

Fixes #13507

@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 1, 2023
src/Core/src/Platform/Windows/ButtonExtensions.cs Outdated Show resolved Hide resolved
var searchBarHandler = CreateHandler(searchBar);
await searchBarHandler.PlatformView.AttachAndRun(async () =>
{
await AssertionExtensions.Wait(() => searchBarHandler.PlatformView.FocusState != UI.Xaml.FocusState.Unfocused);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... what is the reason for checking this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CancelButton only appears when the SearchBar has text and the focus. For that reason, here, we wait until be sure that the native control is focused.

Copy link
Member

@rachelkang rachelkang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a small question about a line in the tests, but otherwise LGTM! happy colors :)

@rmarinho rmarinho enabled auto-merge (squash) March 17, 2023 11:13
@jsuarezruiz
Copy link
Contributor Author

@PureWeen Could I get your feedback here?. Thanks!

@rmarinho rmarinho self-requested a review March 22, 2023 11:40
@rmarinho rmarinho merged commit 522a232 into main Mar 22, 2023
@rmarinho rmarinho deleted the fix-13507 branch March 22, 2023 11:40
@MSLukeWest
Copy link
Contributor

@rmarinho You should also remove this line, or at least the reference to this now closed issue:

, Skip = "This test currently fails on Windows due to https://github.com/dotnet/maui/issues/13507"

@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting SearchBar CancelButtonColor doesn't work on Windows
7 participants