We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfButton horizontal alignment

When I try to place any SfButton element in the Grid and set the HorizontalOptions property to Start, Center or End, the button still remains stretched to the full width of the parent. This happens with a button with an icon, with text, even with an empty button.

Source code:

            <button:SfButton ImageSource="left_arrow"
                             Clicked="NavigateBack" />

            <Label Text="Settings"
                   FontSize="Large" />

Attachment: Аннотация_20190801_192205_bfa415ea.zip

8 Replies

RA Rachel A Syncfusion Team August 2, 2019 01:29 PM UTC

Hi Igor, 
Thanks for contacting Syncfusion Support. 
We have updated the fix in the incident you have created. We request to follow up that incident for further updates.  

RK Radoslaw Kubas August 21, 2020 10:48 AM UTC

Any update on this subject, or maybe the problem appears again? I have same problem with leftest SF version.

Best regards,

HM Hemalatha Marikumar Syncfusion Team August 24, 2020 12:00 PM UTC

Hi Radek, 
Thanks for being back. We need to ensure more testing case related with fix which is already provided in your support incident ticket in previously. Since it mainly related with its measured size, hence need to ensure the same with available layout options and layout, makes this delay. We have mostly done the first phase of our testing; hence we have planned to move this bug fix in our Volume 3, 2020 release which is expected to be rolled out by end of September 2020. 
Hemalatha M. 

SM Saravanan Madheswaran Syncfusion Team October 6, 2020 03:23 PM UTC

Hi Radek 
We deeply regret for this convenience.   
Due to getting the breaking on the existing test cases at last time, we were unable to move this into Volume 3, 2020 release. Hence, we are working on that with high priority and we have planned to move this on October 13,2020 rolled out Weekly NuGet release.  

YP Yuvaraj Palanisamy Syncfusion Team October 14, 2020 07:38 AM UTC

Hi Radek, 
Sorry for the inconvenience caused. 
Due to some technical hurdles, we were unable to include this fix in our weekly NuGet. Currently we are working on resolving those. Hence, we will include this fix for the reported issue in our weekly NuGet which is expected to be rolled out on October 20, 2020. 

HM Hemalatha Marikumar Syncfusion Team October 22, 2020 03:13 PM UTC

Hi Radek, 
Thanks for your patience.  
We have created a new incident under your Direct trac account to follow up with this query. We suggest you follow up with the incident for further updates. Please log in using the below link.    

Hemalatha M. 

AD Adam January 22, 2021 10:37 PM UTC

Given that this is still unresolved after more than a year, I'll recommend a temporary hack for others still waiting. Place the button inside a Xamarin.Forms.Grid. 

     <buttons:SfButton HorizontalOptions="Center" Text="Submit" />

HM Hemalatha Marikumar Syncfusion Team January 25, 2021 07:29 AM UTC

Hi Adam, 
We have checked the provided code snippet and ensured with our latest Syncfusion.Xamarin.Buttons version and  Xamarin version of and it has been worked fine like framework button control. 
        <buttons:SfButton HorizontalOptions="Center" Text="Submit"/> 
        <Button HorizontalOptions="Center" Text="Submit"/> 

Tested sample for your reference:  
Share your used XF version and Syncfusion.Xamarin.Buttons version to test our end and provide a possible solution. 
Hemalatha M. 

Live Chat Icon For mobile
Up arrow icon