Iconize icon indicating copy to clipboard operation
Iconize copied to clipboard

Button with icon and text

Open pcdus opened this issue 7 years ago • 3 comments

Hello,

I would like to know if there is a way to create a button containing both a label ("Add to cart") and the related icon ("Cart")?

Something that looks like this.

Of course, I would like to use a FontIcon as icon...

Thank you!

pcdus avatar Jan 29 '18 09:01 pcdus

Did you ever figure this out?

Welchen avatar Jul 13 '18 21:07 Welchen

This would be very useful. Is there a workaround?

wonea avatar Apr 17 '19 12:04 wonea

I would like this too, I have to work around it and not really happy with it

The comments don't like my XAML so I have a StackLayout with a Tap GestureRecognizer then the following inside.. ` <iconize:IconImage HeightRequest="24" Icon="md-person-add" IconColor="White" VerticalOptions="CenterAndExpand" WidthRequest="24" />

                <Label
                    FontSize="13"
                    Text="Add Account"
                    TextColor="White"
                    VerticalOptions="CenterAndExpand" />

`

I would rather say something like this and then inherit all the button press states for a Button control <iconize:IconButton BackgroundColor="Transparent" FontSize="32" HorizontalOptions="Center" Text="md-person-add" TextColor="#1976d2" Label="Add Account" VerticalOptions="Center" />

Is it possible to do this?

Alternatively I would like two create maybe a converter for the button control so the Image="Image.png" would be a png generated by Iconize

jdinnen avatar May 17 '19 20:05 jdinnen