I started using .NET MAUI recently and I found a problem with Styling.
I started with the basic project to make sure the problem is not something I made during the process.
The project starts with a button that will change text and size each time the user press it.
The problem is any time I use LinearGradientBrush directly or through the global styling, the button size doesn't change to fit the text, and even worse it moves to the left.
I looked everywhere but I didn't find any similar problem or solution.
It works well with Windows but not with Android
Code
<Button
x:Name="CounterBtn"
Text="Click me"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Center">
<Button.Background>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#8A26ED"/>
<GradientStop Color="#381061" Offset="1"/>
</LinearGradientBrush>
</Button.Background>
</Button>