dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.96k stars 1.7k forks source link

Styles don't propagate to SearchHandler #6972

Open Lazareena opened 2 years ago

Lazareena commented 2 years ago

Description

I created a new MAUI project using VS2022 today. I have XamRight installed and it warned me that using the TargetType SearchHandler on Style here, is incorrect. And when I did some testing, I noticed the Style wasn't applied to the SearchHandlers...

Steps to Reproduce

  1. Create new MAUI project in VS2022
  2. Style declaration with TargetType set to SearchHandler not applied to SearchHandlers

Version with bug

Release Candidate 2 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

net6.0-windows10.0.19041.0

Did you find any workaround?

No response

Relevant log output

No response

rachelkang commented 2 years ago

Hi, @Lazareena - thank you for reporting this issue. Could you please share your project or a sample project reproducing the issue you are experiencing so that we may investigate further?

As seen here - the properties applied to the SearchHandler style all belong: https://github.com/dotnet/maui/blob/main/src/Controls/src/Core/Shell/SearchHandler.cs

Styles with TargetType="SearchBar" will affect the SearchBar control whereas styles with TargetType="SearchHandler" will affect the SearchHandler control used in Shell. So if you are indicating that the SearchHandler styles are not propagating to the SearchBar control, then that would be the correct, expected behavior.

Lazareena commented 2 years ago

Hi @rachelkang, thanks for getting back to me. In my sample, I just added a SearchHandler to the existing boilerplate (here) and changed the PlaceholderColor and FontSize in the Style (here). And the changes do not propagate to the SearchHandler. But if I set the PlaceholderColor or any of the other properties directly on the SearchHandler it does appear. I think the issue is there's no Style property on SearchHander...

rachelkang commented 2 years ago

Thanks for the clarification @Lazareena! I understand now and can confirm this is indeed something to be fixed.

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.