Migrating from Xamarin SfButton to .NET MAUI SfButton

20 Nov 20231 minute to read

To migrate easier from Xamarin SfButton to .NET MAUI SfButton, we kept most of the APIs from Xamarin SfButton in MAUI SfButton. However, to maintain the consistency of the API naming in MAUI SfButton, we renamed some of the APIs. The APIs changed in MAUI SfButton from Xamarin SfButton are detailed as follows:

Namespaces

Xamarin SfButton .NET MAUI SfButton
Syncfusion.XForms.Buttons Syncfusion.Maui.Buttons

Properties

Xamarin SfButton .NET MAUI SfButton Description

BorderWidth

StrokeThickness

Gets or sets the stroke thickness.

BorderColor

Stroke

Gets or sets the color of the border.

BackgroundImage

BackgroundImageSource

Gets or sets the background image in Button.

ImageWidth

ImageSize

Gets or sets the image size in Button.

Known Issues

The gradient colors used as a background are not functioning as expected because of a framework-level issue. This issue is specifically related to the incorrect rendering of gradient color on iOS and macOS when clipping a view. Refer to this link for more details.