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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Sample for custom view with activity indicator

Thread ID:





143644 Mar 29,2019 03:39 PM UTC Apr 19,2019 05:44 AM UTC Xamarin.Forms 5
Tags: SfButton
Asked On March 29, 2019 03:39 PM UTC


One of the the features listed for Sfbutton is the custom view for button that shows processing indicator within button. Is there a sample on how that can be implemented?



Bharathiraja K [Syncfusion]
Replied On April 1, 2019 12:12 PM UTC

Hi Apurva, 
Greetings from Syncfusion. We can add any kind of view as custom view inside the SfButton by below  
Code Snippet [XAML] 
<buttons:SfButton HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HeightRequest="60" CornerRadius="20"> 
                    <StackLayout Orientation="Horizontal" VerticalOptions="Start" HorizontalOptions="FillAndExpand" > 
                    <busyindicator:SfBusyIndicator HorizontalOptions="Start" x:Name="busyindicator" AnimationType="Ball" IsBusy="True" ViewBoxWidth = "50" ViewBoxHeight="50" TextColor="Maroon" /> 
                        <Label HorizontalOptions="FillAndExpand" VerticalTextAlignment="Center" VerticalOptions="Center" Text="Processing" FontSize="20" /> 
We have prepared the sample based on your requirement, that can be downloaded from below location. 

Eugen Dolgi
Replied On April 5, 2019 06:11 AM UTC

Button with ControlTemplate does not work under UWP! Button is not displayed completely. Not in your sample either. I tested versions and

Hemalatha Marikumar [Syncfusion]
Replied On April 8, 2019 12:38 PM UTC

Hi Apurva,

Sorry for the inconvenience caused.

Your requirement has been achieve by using suggested "Content" property in SfButton. We have prepared the sample based on the Content property which has been download from below link

Sample Link: http://www.syncfusion.com/downloads/support/forum/143644/ze/SimpleSampleExample-888740433

Code Example:

<buttons:SfButton HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HeightRequest="60" CornerRadius="20">
                      <StackLayout Orientation="Horizontal" BackgroundColor="LightBlue" VerticalOptions="Start" HorizontalOptions="FillAndExpand" >
                                <busyindicator:SfBusyIndicator HorizontalOptions="Start" x:Name="busyindicator" AnimationType="SlicedCircle" IsBusy="True" ViewBoxWidth = "30" ViewBoxHeight="30" TextColor="Maroon" />
                              <Label HorizontalOptions="FillAndExpand" VerticalTextAlignment="Center" VerticalOptions="Center" Text="Processing..." FontSize="20" />

Please let us know if you have any concern.

Hemalatha M.

Replied On April 18, 2019 07:55 PM UTC

Thank you so much for the help! These code samples helped me make it work!!

Bharathiraja K [Syncfusion]
Replied On April 19, 2019 05:44 AM UTC

Hi Apurva, 
We are glad that the reported problem resolved at your end. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon