How to change SearchBar’s icon color in .NET MAUI
How to change the SearchBar icon color in .NET MAUI using the new SearchIconColor property introduced in .NET 10.
Starting with .NET 10, MAUI’s search bar comes with a new property for changing the SearchBar‘s search icon color: SearchIconColor.
As with any bindable property, you can assign it a color value like Purple or bind it to a resource as follows:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<SearchBar Placeholder="Search videos..." SearchIconColor="{StaticResource Primary}" />
<ScrollView>
<VerticalStackLayout>
</VerticalStackLayout>
</ScrollView>
</Grid> 