Open matt-goldman opened 2 years ago
maybe this is what you're looking for:
Thanks, that helped. I wonder if that should be the default? Would make it consistent with the other platforms.
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.
Hit same issue. Workaround, Change Styles.xaml
<Style TargetType="SearchBar">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource LightBackground}, Dark={StaticResource DarkBackground}}" />
</Style>
The same issue is also for me. SearchBar under ios (net 7.0, net 8.0.21, ios 17.2, ios 16.4) ignores UISearchBarStyle and colors from Styles.xaml and direct property assign. ios SearchBarStyle change explicitly on runtime (from Minimum to Default and back to Minimum) makes effect only in that case.
Can confirm this issue - a SearchBar
without any colors specified renders with a black background in iOS (no dark mode set):
<SearchBar Text="{Binding SearchText}" Placeholder="Suche" SearchCommand="{Binding SearchCommand}" />
Setting ios:SearchBar.SearchBarStyle="Minimal"
helps.
Description
On iOS and MacCatalyst, if you set the
BackgroundColor
of aSearchBar
toTransparent
, the background goes black. This only seems to occur if you change it or set it explicitly and not with the default value.Does not occur on Windows or Android.
Steps to Reproduce
SearchBar
BackgroundColor
property of theSearchBar
toTransparent
, or change it toTransparent
at runtimeLink to public reproduction project repository
https://github.com/matt-goldman/MauiTransparentBackgroundBug
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
macOS 13.0.1, iOS 14 (not tested on other versions)
Did you find any workaround?
No response
Relevant log output
No response