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

Button with image from Xam.Plugin.Iconize.FontAwesome

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.

2 Replies

MA Mark 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>



BK Bharathiraja K Syncfusion Team May 30, 2019 05:10 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon