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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Button with image from Xam.Plugin.Iconize.FontAwesome

Thread ID:

Created:

Updated:

Platform:

Replies:

144942 May 29,2019 01:43 PM UTC May 30,2019 05:10 AM UTC Xamarin.Forms 2
loading
Tags: SfButton
Mark
Asked On May 29, 2019 01:43 PM UTC

Hi,

Can I use an icon as an image for a SFButton. I want to do something similar to this:

 <iconize:IconButton
                    FontSize="20"
                    Text="fas-address-book"
                    TextColor="Red"
                    WidthRequest="48" />

Thanks

Mark.

Mark
Replied On May 29, 2019 02:20 PM UTC

Hi,

I have found an easy solution to this. Create the icon within the button as follows:


                <buttons:SfButton Command="{Binding StartWizardCommand}" VerticalOptions="End"
                                  HorizontalOptions="Center" Margin="0, 0, 0, 10"
                                  BackgroundColor="{StaticResource ButtonColor}"
                                  Style="{StaticResource SfButtonStyle}">
                    <buttons:SfButton.Content>
                            <iconize:IconLabel FontSize="Large" VerticalOptions="Center" Text="fab-apple" HorizontalOptions="Center" TextColor="Red"/>
                    </buttons:SfButton.Content>
                </buttons:SfButton>


Bharathiraja K [Syncfusion]
Replied On May 30, 2019 05:10 AM UTC

Hi Mark, 
 
Greetings from Syncfusion. Yes. Your are correct.  
 
Regards, 
Bharathi. 


CONFIRMATION

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