New to Telerik UI for .NET MAUIStart a free 30-day trial

Converts CornerRadius to Thickness and converts back Thickness to CornerRadius.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class CornerRadiusToThicknessConverter : IValueConverter

Inheritance: objectCornerRadiusToThicknessConverter

Implements: IValueConverter

Constructors

C#
public CornerRadiusToThicknessConverter()

Properties

Instance

IValueConverter

Gets a static instance of the class.

C#
public static IValueConverter Instance { get; }

Methods

Converts a CornerRadius to a Thickness.

C#
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobject

The CornerRadius value to convert.

targetTypeType

The type of the binding target property.

parameterobject

The converter parameter to use.

cultureCultureInfo

The culture to use in the converter.

Returns:

object

A Thickness with values mapped from the CornerRadius components.

Converts a Thickness back to a CornerRadius.

C#
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobject

The Thickness value to convert back.

targetTypeType

The type of the binding target property.

parameterobject

The converter parameter to use.

cultureCultureInfo

The culture to use in the converter.

Returns:

object

A CornerRadius with values mapped from the Thickness components.