xamarin-forms-docs/knowledge-base/button-text-uppercase-lower...

1.7 KiB

title description type page_title slug position tags ticketid res_type
Button text with uppercase or lowercase Dislay button text with uppercase or lowercase how-to Set button text to uppercase or lowercase button-text-uppercase-lowercase button, text, xamarin.forms, lowercase, uppercase 1539092 kb

Environment

Product Version 2021.3.915.1
Product Button for Xamarin Cross-Platform

Description

This article shows how-to change the button text to be uppercase or lowercase on Android, iOs, UWP.

Solution

Use the TextTransform(enum of type Xamarin.Forms.TextTransform): specifies the casing of the Button text:

The values are:

  • None: displays the text as defined in the Text porperty with the correct upper/lower case
  • Default: the default text casing per platform.
  • Lowercase: text with lowercase
  • Uppercase: text with uppercase

Example

<telerikInput:RadButton x:Name="button" 
                        BorderWidth="2"
						TextTransform="None"
                        Text="Click me!"  
                        Clicked="button_Clicked"/>
  • When TextTransform="None", the text will be displayed as Click me! on all platforms.

  • When TextTransform="Default",

    • On Android the text will be displayed as CLICK ME! on all platforms.
    • on iOS the text will be displayed as Click me!.
    • On UWP the text will be displayed as Click me!.

When TextTransform="Lowercase", the text will be displayed as click me! on all platforms.

When TextTransform="Uppecase", the text will be displayed as CLICK ME! on all platforms.