In my xamarin forms project button text are always show in uppercase format.
But I am providing upper and lower case letters in xaml. When I build the solution all the letters are changed to uppercase.
I'm guessing you see this on Android as it is the default for button text and has been since Lollipop.
To change this behavior add the following to your styles.xml file which can be found in the Android project under the Resources then values folders
<item name="android:textAllCaps">false</item>
An alternative is to simply use TextTransform
property:
<Button Text="Click Me" TextTransform="None"/>
Or in a style definition:
<Style TargetType="Button" x:Key="NoDefaultCapsButton"> <Setter Property="TextTransform" Value="None"/> </Style> <Button Text="Click Me" Style="{x:StaticResource NoDefaultCapsButton}"/>
Be sure you are using Xamarin.Forms NuGet package 4.8.0.1534 or above, if TextTransform
is not showing for you than clean and rebuild your solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With