Key Features

The purpose of this help article is to show you the key features of the RadButton control.

Define RadButton

Add RadButton definition in XAML:

<telerikInput:RadButton Text="RadButton" BackgroundColor="Transparent" BorderColor="Red" BorderThickness="2"/>

Add the following namespace:

xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.Maui.Controls.Compatibility"

Register the Telerik controls through Telerik.Maui.Controls.Compatibility.UseTelerik extension method called inside the Configure method of the Startup.cs file of your project:

using Telerik.Maui.Controls.Compatibility;



public void Configure(IAppHostBuilder appBuilder)
{
    appBuilder        
        .UseTelerik()
        .UseMauiApp<App>();

}              

Content Alignment

RadButton exposes HorizontalContentAlignment and VerticalContentAlignment properties of type Microsoft.Maui.TextAlignment which you can use to set different positioning of its content.

Here is a quick example how you can apply these:

<telerikInput:RadButton Text="Click me!"  
                        BorderColor="#4488F6" 
                        HorizontalContentAlignment="End" 
                        VerticalContentAlignment="Start" />

Border Thickness

The BorderThickness property is of type Microsoft.Maui.Thickness and is used to set the borders’ width. Type Thickness gives you the option to define different border on each side of the Button.

The snippet below demonstrates how BorderThickness could be defined.

<telerikInput:RadButton Text="Click me!"  
                        BorderThickness="6, 2, 2, 6" 
                        BorderColor="#4488F6" />

Telerik Button for .NET MAUI

Button Key Features Example

See Also

In this article
Not finding the help you need?